From b0bb91be22566c53768dc4135f715357d324c7ad Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 11 Aug 2003 17:52:24 +0000 Subject: * eval.c (struct thread): add member to save backing store on IA64. (ruby-bugs PR1086) * eval.c (thread_mark): mark IA64 backing store region. * eval.c (thread_free): free saved IA64 backing store. * eval.c (rb_thread_save_context): save IA64 backing store as well. * eval.c (rb_thread_restore_context): restore IA64 backing store. * eval.c (THREAD_ALLOC): initialize IA64 members. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- sample/test.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'sample') diff --git a/sample/test.rb b/sample/test.rb index 1fb1c24cf..6d2a6cde9 100644 --- a/sample/test.rb +++ b/sample/test.rb @@ -1078,6 +1078,22 @@ class ITER_TEST2 < ITER_TEST1 end test_ok(ITER_TEST2.new.a {}) +class ITER_TEST3 + def foo x + return yield if block_given? + x + end +end + +class ITER_TEST4 < ITER_TEST3 + def foo x + test_ok(super == yield) + test_ok(super(x, &nil) == x) + end +end + +ITER_TEST4.new.foo(44){55} + test_check "float" test_ok(2.6.floor == 2) test_ok((-2.6).floor == -3) -- cgit