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

Define singleton method on each new objects

This commit is contained in:
Nobuyoshi Nakada 2019-06-28 15:22:27 +09:00
parent a0c141b6d0
commit e0c4cb2ea1
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -29,6 +29,8 @@ class TestStringIO < Test::Unit::TestCase
nil
end
assert_raise(TypeError) { StringIO.new(o) }
o = Object.new
def o.to_str
'str'
end