diff --git a/ChangeLog b/ChangeLog index 87535e9cc6..de51753e05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Jan 2 15:18:54 2012 Kazuki Tsujimoto + + * test/ruby/test_object.rb (test_send_with_block): moved from + bootstraptest/test_flow.rb. + Mon Jan 2 15:10:11 2012 Kazuhiro NISHIYAMA * lib/test/unit/parallel.rb: use pack("m0") instead of diff --git a/bootstraptest/test_flow.rb b/bootstraptest/test_flow.rb index edc6e46f10..d40d814fbc 100644 --- a/bootstraptest/test_flow.rb +++ b/bootstraptest/test_flow.rb @@ -549,16 +549,3 @@ assert_equal %Q{ENSURE\n}, %q{ 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 -} diff --git a/test/ruby/test_object.rb b/test/ruby/test_object.rb index 4ce422f7b5..5c6824e8a5 100644 --- a/test/ruby/test_object.rb +++ b/test/ruby/test_object.rb @@ -437,6 +437,20 @@ class TestObject < Test::Unit::TestCase 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]'