33
Root
3y

Cool, I found a bug in Ruby!
And it’s preventing my debugging from working!
Asjfkladfsj

It’s 2:30am and I want to finish this crap.

No, I’m not doing any work tomorrow. I’m taking the day off to sleep.

Comments
  • 8
    5:20am and I’m not much closer to fixing them.

    Seven freaking hours on the last two specs. I am so fucking done.

    I’m going to bed.
  • 6
    @Root wise choice, empress.

    good night, good fight.
  • 3
    The person who should have been working on these specs (a security guy) is also stumped, and had me write in a dirty workaround to simply skip the failing checks.

    He passed it onto another dev — the one who originally wrote the controllers the specs are testing.

    Doubtless it’ll come back to me again, but for the moment, I have peace.
  • 1
    @Root until someone else gives you something they should’ve been doing...😐
  • 1
    ...and you end up staying up until 5 am doing their stuff, sleeping only an hr (at most), ruining your health but that means nothing to them
  • 0
    A bug inside a ruby? How fascinating.
  • 0
    What’s the bug?
  • 3
    @OmerFlame I couldn’t inspect a complex object; inspect was throwing because it was trying to coerce a Nil into a String. (Which honestly shouldn’t be a problem.)

    It was late and I didn’t care why. I just debugged the object a different way.
  • 0
    @electrineer I’ve found a few, and a few in Rails too.

    It’s much easier to find bugs in Rails, so props to Matz, et. al.
  • 0
    @Root throwing as in do-catch closures?
  • 0
    @OmerFlame as in raising an exception.

    Inspect is basically a recursive stringifier that elegantly handles edge cases like circular references, streams, etc. so having it raise an exception on converting something simply shouldn’t happen.

    Now that I’m more awake and looking at this again, it’s possible someone overrided the to_s or inspect method on some sub-object, and their implementation stinks. That’s more likely than a flaw in an internal method. Still possible, though; I’ve found simple oversights like this in the official code before.
  • 1
    @Root does to_s convert everything to "s"
  • 0
    @electrineer it’s short for to_string.
    And it’s implemented on basically everything by default. inspect is also.
  • 0
  • 1
    Sure it’s not a fossil ?
Add Comment