ruby-changes:12393
From: yugui <ko1@a...>
Date: Tue, 14 Jul 2009 00:47:37 +0900 (JST)
Subject: [ruby-changes:12393] Ruby:r24092 (trunk): * test/ruby/test_case.rb (TestCase#test_deoptimization):
yugui 2009-07-14 00:47:20 +0900 (Tue, 14 Jul 2009) New Revision: 24092 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24092 Log: * test/ruby/test_case.rb (TestCase#test_deoptimization): test for [ruby-core:23190]. Modified files: trunk/ChangeLog trunk/test/ruby/test_case.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 24091) +++ ChangeLog (revision 24092) @@ -1,3 +1,8 @@ +Tue Jul 14 00:45:41 2009 Yuki Sonoda (Yugui) <yugui@y...> + + * test/ruby/test_case.rb (TestCase#test_deoptimization): + test for [ruby-core:23190]. + Mon Jul 13 22:49:50 2009 Yuki Sonoda (Yugui) <yugui@y...> * lib/prime.rb (Prime#prime_division): now decomposes Index: test/ruby/test_case.rb =================================================================== --- test/ruby/test_case.rb (revision 24091) +++ test/ruby/test_case.rb (revision 24092) @@ -1,4 +1,5 @@ require 'test/unit' +require 'envutil.rb' class TestCase < Test::Unit::TestCase def test_case @@ -46,4 +47,14 @@ assert(false) end end + + def test_deoptimization + assert_in_out_err(['-e', <<-EOS], '', %w[42], []) + class Symbol; def ===(o); p 42; true; end; end; case :foo; when :foo; end + EOS + + assert_in_out_err(['-e', <<-EOS], '', %w[42], []) + class Fixnum; def ===(o); p 42; true; end; end; case 1; when 1; end + EOS + end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/