Bug #7588
closedNew warnings on ||=
Description
I'm now getting warnings on my projects w/ 2.0 (ruby 2.0.0dev (2012-12-08 trunk 38265) [x86_64-darwin12.2.1]) when I use ||= to initialize unset variables. This never happened in < 2.0.
def initialize_test
self.multiruby_skip ||= []
self.testlib ||= :testunit
self.test_prelude ||= nil
self.rspec_dirs ||= %w(spec lib)
self.rspec_options ||= []
end
begets:
/Users/ryan/Work/p4/zss/src/hoe/dev/lib/hoe/test.rb:59: warning: instance variable @multiruby_skip not initialized
/Users/ryan/Work/p4/zss/src/hoe/dev/lib/hoe/test.rb:60: warning: instance variable @testlib not initialized
/Users/ryan/Work/p4/zss/src/hoe/dev/lib/hoe/test.rb:61: warning: instance variable @test_prelude not initialized
/Users/ryan/Work/p4/zss/src/hoe/dev/lib/hoe/test.rb:62: warning: instance variable @rspec_dirs not initialized
/Users/ryan/Work/p4/zss/src/hoe/dev/lib/hoe/test.rb:63: warning: instance variable @rspec_options not initialized
Updated by nobu (Nobuyoshi Nakada) over 12 years ago
- Status changed from Open to Feedback
Try with newer revision.
Updated by zenspider (Ryan Davis) over 12 years ago
- Status changed from Feedback to Closed
seems fixed. thanks