1
0
Fork 0
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:
nobu 2014-09-13 00:47:02 +00:00
parent 2e33fdfbca
commit bf1c869b16

View file

@ -66,7 +66,7 @@ class TestRubyYield < Test::Unit::TestCase
end
def test_with_enum
obj = Object
obj = Object.new
def obj.each
yield(*[])
end