diff options
author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-06 17:12:20 +0000 |
---|---|---|
committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-06 17:12:20 +0000 |
commit | 727024fbac6ac97a3c4236583e5819d72a1513b7 (patch) | |
tree | 41159d5b62a79e1960b90d92eeda875fab886ebf /test/ruby | |
parent | b8b01ab995b963db825b9b493aa98500f0be83e0 (diff) | |
download | ruby-727024fbac6ac97a3c4236583e5819d72a1513b7.tar.gz |
* 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
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_enumerator.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_enumerator.rb b/test/ruby/test_enumerator.rb index 49d7827d35..b2ef8e5c25 100644 --- a/test/ruby/test_enumerator.rb +++ b/test/ruby/test_enumerator.rb @@ -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 |