mirror of
https://github.com/ruby/ruby.git
synced 2026-08-17 02:20:55 +08: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
@ -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…
x
Reference in New Issue
Block a user