Closed mvz closed 13 years ago
Hmm. I rarely use -w because I don't agree that everything they warn about is actually a problem. In this case I'm a bit shocked, since "instance variables default to nil" is one of the features that makes Ruby such a concise language. I'm reluctant to clutter our code with a pointless initializer. OTOH, the customer is king... so I'd be happy to hear arguments on the other side.
My argument would be that if you make a gem run without warnings, it can be cleanly used by people who like using -w
. That's why I'm running my tests with warnings on, since they're tests for a gem.
I hate it when people come up with reasonable arguments!
OK, you're probably right. This would fall under the "it's a library, so you can't just do anything you want" category, along with monkey patching.
Fixed with release 0.5.4 (and .5 and .6 ... don't ask!) -- please confirm.
Yes, confirmed. Thanks.
Hi, I run my tests with warnings enabled, and each test outputs:
Adding the following just before the offending line solves this: