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

@ -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]'