diff options
Diffstat (limited to 'sample/test.rb')
-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) |