summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-16 23:03:17 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-16 23:03:17 +0000
commitab6963043df202bde77d67dfabff41cc3e7c11c8 (patch)
treed5cf03877443f10c2d0846533fdad64ede925073 /sample
parenta4d687f1c76874623e5a239279ca1d7886697abc (diff)
* error.c (exc_initialize): calling 'to_str' each time just for
type checking is too heavy. [ruby-core:02661] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r--sample/test.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/sample/test.rb b/sample/test.rb
index 7e58cd5362..d61b1e7098 100644
--- a/sample/test.rb
+++ b/sample/test.rb
@@ -1264,6 +1264,12 @@ def test_b14
end
test_ok(test_b14() == 144)
+def test_b15
+ [0].each {|c| yield 1 }
+ 156
+end
+test_ok(test_b15{|e| break 155 } == 155)
+
def marity_test(m)
method = method(m)
test_ok(method.arity == method.to_proc.arity, 2)
@@ -1992,7 +1998,7 @@ module Olympians
@@rule ="Zeus"
def ruler3
@@rule
- end
+ end
end
class Titans < Gods