diff options
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_object.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_object.rb b/test/ruby/test_object.rb index d93d5594a7..6a1a82546a 100644 --- a/test/ruby/test_object.rb +++ b/test/ruby/test_object.rb @@ -18,6 +18,14 @@ class TestObject < Test::Unit::TestCase assert_same(object, object.itself, feature6373) end + def test_yield_self + feature = '[ruby-core:46320] [Feature #6721]' + object = Object.new + assert_same(self, object.yield_self {self}, feature) + assert_same(object, object.yield_self {|x| break x}, feature) + assert_instance_of(Enumerator, object.yield_self) + end + def test_dup assert_equal 1, 1.dup assert_equal true, true.dup |