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:
parent
a0c141b6d0
commit
e0c4cb2ea1
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue