mirror of
https://github.com/ruby/ruby.git
synced 2025-08-27 06:56:13 +02:00
* 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:
parent
b8b01ab995
commit
727024fbac
2 changed files with 10 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue