diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-01 02:52:21 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-01 02:52:21 +0000 |
commit | 601354bd6b661950663746bc41fe364b67bb8cd5 (patch) | |
tree | 0d3a28d2d017105b74cc60301cf522134b0a4692 /sample | |
parent | 81f52e532b8923f2544d129f90ccb1514f1615e0 (diff) | |
download | ruby-601354bd6b661950663746bc41fe364b67bb8cd5.tar.gz |
* eval.c (BEGIN_CALLARGS): should not always reset ruby_iter,
need to restore previous value. [ruby-talk:77577]
* array.c (rb_ary_fill): array length may be changed during the
block execution. [ruby-talk:77579]
* array.c (rb_ary_zip): ditto.
* array.c (rb_ary_fill): ditto.
* hash.c (env_reject_bang): length may be changed during the block
execution.
* hash.c (env_clear): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r-- | sample/test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sample/test.rb b/sample/test.rb index e281b679b1..1fb1c24cf3 100644 --- a/sample/test.rb +++ b/sample/test.rb @@ -1064,6 +1064,20 @@ marity_test(:p) lambda(&method(:test_ok)).call(true) lambda(&get_block{|a,n| test_ok(a,n)}).call(true, 2) +class ITER_TEST1 + def a + block_given? + end +end + +class ITER_TEST2 < ITER_TEST1 + def a + test_ok(super) + super + end +end +test_ok(ITER_TEST2.new.a {}) + test_check "float" test_ok(2.6.floor == 2) test_ok((-2.6).floor == -3) |