Test/unit.rb:44: warning: instance variable @init_hook not initialized

e$B0J2<$N$h$&$K$9$k$H!"e(Btest/unit.rb:44 e$B$G7Y9p$,=P$k$s$G$9$,!"e(B
e$B$I$&$d$C$?$i$&$^$/>C$;$^$9$+$M!#e(B

% ./ruby -Ilib -v test/ruby/test_condition.rb
ruby 1.9.3dev (2010-08-10 trunk 28953) [i686-linux]
/home/ruby/tcio/ruby/lib/test/unit.rb:44: warning: instance variable
@init_hook not initialized
Loaded suite test/ruby/test_condition
Started
.
Finished in 0.004675 seconds.

1 tests, 2 assertions, 0 failures, 0 errors, 0 skips

[email protected]>;3OB9-$G$9!#e(B

At Tue, 10 Aug 2010 21:08:54 +0900,
Tanaka A. wrote:

e$B0J2<$N$h$&$K$9$k$H!"e(Btest/unit.rb:44 e$B$G7Y9p$,=P$k$s$G$9$,!"e(B
e$B$I$&$d$C$?$i$&$^$/>C$;$^$9$+$M!#e(B

% ./ruby -Ilib -v test/ruby/test_condition.rb
ruby 1.9.3dev (2010-08-10 trunk 28953) [i686-linux]
/home/ruby/tcio/ruby/lib/test/unit.rb:44: warning: instance variable
@init_hook not initialized

e$B$A$g$C$H$$F$[email protected][email protected]$H!"e(B Test::Unit::Options e$B$Oe(B
lib/test/unit.rb e$B$N:G8e$NJ}$Ne(B

class MiniTest::Unit
def self.new(*)
super
.extend(Test::Unit::RunCount)
.extend(Test::Unit::Options)
end

e$B$Ge(B extend e$B$5$l$F;[email protected]$1$G!"e(B

module Options
  def initialize(&block)
    @init_hook = block
    super(&nil)
  end

e$B$Ne(B @init_hook
e$B$K2?$+$,@Dj$5$l$k>l9g$r$$D$1$i$l$J$+$C$?$N$G$9$,!"e(B
e$B$I$&$$$&>[email protected]_Dj$5$l$k$N$G$7$g$&$+e(B?

extend e$B$5$l$?>[email protected]$1FCJL07$$$9$k$N$J$ie(B extended e$B$Ge(B
instance_variable_set e$B$9$l$P$h$5$=$&$G$9$,!#e(B

diff --git a/lib/test/unit.rb b/lib/test/unit.rb
index 259ff98…6d33188 100644
— a/lib/test/unit.rb
+++ b/lib/test/unit.rb
@@ -35,6 +35,10 @@ module Test
super(&nil)
end

  •  def self.extended(mod)
    
  •    mod.instance_variable_set(:@init_hook, nil)
    
  •  end
    
  •  def process_args(args = [])
       options = {}
       OptionParser.new do |opts|

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs