summaryrefslogtreecommitdiffstats
path: root/sample/test.rb
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
commitaf61503709667cb380084f48f22c8855d13fcc19 (patch)
treed5cf03877443f10c2d0846533fdad64ede925073 /sample/test.rb
parent82bf119bb1d63d30bd6f39e2e6f464cdaf4bab31 (diff)
downloadruby-af61503709667cb380084f48f22c8855d13fcc19.tar.gz
ruby-af61503709667cb380084f48f22c8855d13fcc19.tar.xz
ruby-af61503709667cb380084f48f22c8855d13fcc19.zip
* error.c (exc_initialize): calling 'to_str' each time just for
type checking is too heavy. [ruby-core:02661] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/test.rb')
-rw-r--r--sample/test.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/sample/test.rb b/sample/test.rb
index 7e58cd536..d61b1e709 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