* vm_eval.c (rb_f_loop): Support for loop.size

[Feature #6636]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
marcandre 2012-11-06 17:12:20 +00:00
parent b8b01ab995
commit 727024fbac
2 changed files with 10 additions and 1 deletions

View file

@ -464,5 +464,9 @@ class TestEnumerator < Test::Unit::TestCase
assert_equal 0, [].cycle.size
assert_equal 0, [].cycle(5).size
end
def test_size_for_loops
assert_equal Float::INFINITY, loop.size
end
end