From: "zenspider (Ryan Davis)" Date: 2012-12-27T21:53:59+09:00 Subject: [ruby-core:51160] [ruby-trunk - Bug #7588][Closed] New warnings on ||= Issue #7588 has been updated by zenspider (Ryan Davis). Status changed from Feedback to Closed seems fixed. thanks ---------------------------------------- Bug #7588: New warnings on ||= https://bugs.ruby-lang.org/issues/7588#change-35109 Author: zenspider (Ryan Davis) Status: Closed Priority: Normal Assignee: Category: Target version: ruby -v: 2.0 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 -- http://bugs.ruby-lang.org/