1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/ruby/test_object.rb (test_send_with_block): moved from

bootstraptest/test_flow.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ktsj 2012-01-02 06:25:01 +00:00
parent 7d9fe82be4
commit 66f9d5fe11
3 changed files with 19 additions and 13 deletions

View file

@ -1,3 +1,8 @@
Mon Jan 2 15:18:54 2012 Kazuki Tsujimoto <kazuki@callcc.net>
* 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@mbf.nifty.com> Mon Jan 2 15:10:11 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
* lib/test/unit/parallel.rb: use pack("m0") instead of * lib/test/unit/parallel.rb: use pack("m0") instead of

View file

@ -549,16 +549,3 @@ assert_equal %Q{ENSURE\n}, %q{
assert_equal "false", src + %q{e.all? {false}}, bug assert_equal "false", src + %q{e.all? {false}}, bug
assert_equal "true", src + %q{e.include?(:foo)}, bug assert_equal "true", src + %q{e.include?(:foo)}, bug
end 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
}

View file

@ -437,6 +437,20 @@ class TestObject < Test::Unit::TestCase
assert_raise(ArgumentError) { 1.send } assert_raise(ArgumentError) { 1.send }
end 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 def test_no_superclass_method
bug2312 = '[ruby-dev:39581]' bug2312 = '[ruby-dev:39581]'