summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-08-11 17:52:24 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-08-11 17:52:24 +0000
commit466c684881ccd374232e2a1889fc761232992c2e (patch)
tree3dde647927b03d79daa07e3a64b36721559dba86 /sample
parentd4506dfcedac975ac63a07a0cdce986498016397 (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@4368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r--sample/test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/sample/test.rb b/sample/test.rb
index 1fb1c24cf3..6d2a6cde95 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)