mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_yield.rb: use temporary instance
* test/ruby/test_yield.rb (test_with_enum): use temporary instance, do not define a method on the global class object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2e33fdfbca
commit
bf1c869b16
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ class TestRubyYield < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_with_enum
|
||||
obj = Object
|
||||
obj = Object.new
|
||||
def obj.each
|
||||
yield(*[])
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue