3 ms·
No, adding should to Kernel fixes nothing. Your definition of the omg method returns the result of the comparison, thus it is no longer a void context. So the
by tenderlove 16y ago
No, adding should to Kernel fixes nothing. Your definition of the omg method returns the result of the comparison, thus it is no longer a void context. So the return value of omg is the return value of the comparison.
In your RSpec specs, if you only have one "==" expectation and it is the last one of the block, you will not get a warning.
I HAVE MADE ANOTHER AWESOME VIDEO WITH SUPER AWESOME MUSIC TO ILLUSTRATE!!!!
http://www.youtube.com/watch?v=M8SB7mcQfrY http://www.youtube.com/watch?v=M8SB7mcQfrY
Hope this makes sense! :-D
<3 <3 <3 <3 <3 <3 <3 <3
- petercooper 16y agoAh, so it does - thanks for clearing it up. I wondered why you were throwing that extra "true" in there so didn't do it on my v2 but should have pondered this more deeply ;-) I've updated my comment with the relevant notes. All that said, though, this is sucky. But since I never run with warnings on, I'm going to put some headphones on and hop around shouting "LA LA LA" whenever I run my specs next.. or I could partake in this grotesque workaround of temporarily forcing warnings off: http://codesnippets.joyent.com/posts/show/1438 http://codesnippets.joyent.com/posts/show/1438