ruby-changes:22123
From: ktsj <ko1@a...>
Date: Mon, 2 Jan 2012 15:25:12 +0900 (JST)
Subject: [ruby-changes:22123] ktsj:r34172 (trunk): * test/ruby/test_object.rb (test_send_with_block): moved from
ktsj 2012-01-02 15:25:01 +0900 (Mon, 02 Jan 2012) New Revision: 34172 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34172 Log: * test/ruby/test_object.rb (test_send_with_block): moved from bootstraptest/test_flow.rb. Modified files: trunk/ChangeLog trunk/bootstraptest/test_flow.rb trunk/test/ruby/test_object.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 34171) +++ ChangeLog (revision 34172) @@ -1,3 +1,8 @@ +Mon Jan 2 15:18:54 2012 Kazuki Tsujimoto <kazuki@c...> + + * test/ruby/test_object.rb (test_send_with_block): moved from + bootstraptest/test_flow.rb. + Mon Jan 2 15:10:11 2012 Kazuhiro NISHIYAMA <zn@m...> * lib/test/unit/parallel.rb: use pack("m0") instead of Index: bootstraptest/test_flow.rb =================================================================== --- bootstraptest/test_flow.rb (revision 34171) +++ bootstraptest/test_flow.rb (revision 34172) @@ -549,16 +549,3 @@ assert_equal "false", src + %q{e.all? {false}}, bug assert_equal "true", src + %q{e.include?(:foo)}, bug end -assert_equal %q{ok}, %q{ - $x = :ok - o = Object.new - def o.inspect - yield if block_given? - super - end - begin - nil.public_send(o) {$x = :ng} - rescue - end - $x -} Index: test/ruby/test_object.rb =================================================================== --- test/ruby/test_object.rb (revision 34171) +++ test/ruby/test_object.rb (revision 34172) @@ -437,6 +437,20 @@ assert_raise(ArgumentError) { 1.send } end + def test_send_with_block + x = :ok + o = Object.new + def o.inspect + yield if block_given? + super + end + begin + nil.public_send(o) { x = :ng } + rescue + end + assert_equal(:ok, x) + end + def test_no_superclass_method bug2312 = '[ruby-dev:39581]' -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/