ruby-changes:55250
From: k0kubun <ko1@a...>
Date: Sat, 6 Apr 2019 11:42:33 +0900 (JST)
Subject: [ruby-changes:55250] k0kubun:r67457 (trunk): Suppress unnecessary warnings in test_jit
k0kubun 2019-04-06 11:42:30 +0900 (Sat, 06 Apr 2019) New Revision: 67457 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67457 Log: Suppress unnecessary warnings in test_jit Modified files: trunk/test/ruby/test_jit.rb Index: test/ruby/test_jit.rb =================================================================== --- test/ruby/test_jit.rb (revision 67456) +++ test/ruby/test_jit.rb (revision 67457) @@ -184,9 +184,9 @@ class TestJIT < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_jit.rb#L184 end def test_compile_insn_definemethod - assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: 'hellohello', success_count: 2, insns: %i[definemethod]) + assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: 'hello', success_count: 2, insns: %i[definemethod]) begin; - print 2.times.map { + print 1.times.map { def method_definition 'hello' end @@ -698,9 +698,11 @@ class TestJIT < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_jit.rb#L698 end end + verbose, $VERBOSE = $VERBOSE, false # suppress "instance variable @b not initialized" print(Foo.new.bar) print(Foo.new.bar) print(Foo.new.bar) + $VERBOSE = verbose end; end @@ -729,10 +731,8 @@ class TestJIT < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_jit.rb#L731 p(a.undefined) # redefinition - class A - def test - 3 - end + def a.test + 3 end print(2 * a.test) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/