summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-02-05 10:27:34 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-02-05 10:27:34 +0000
commit9b64dfe3b8f0343ebf97ae80d3a4ec3f4bd115b3 (patch)
tree7acd7b77321fdbc63149b47fde3bace6f7733614 /sample
parent06d4e3b42d836b762c29cdc9dc7181caf14dcdec (diff)
990205
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r--sample/test.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/sample/test.rb b/sample/test.rb
index f283276..bc136eb 100644
--- a/sample/test.rb
+++ b/sample/test.rb
@@ -183,7 +183,7 @@ ok(i>4)
check "exception";
begin
- fail "this must be handled"
+ raise "this must be handled"
ok(false)
rescue
ok(true)
@@ -191,7 +191,7 @@ end
$bad = true
begin
- fail "this must be handled no.2"
+ raise "this must be handled no.2"
rescue
if $bad
$bad = false
@@ -205,9 +205,9 @@ ok(true)
$string = "this must be handled no.3"
begin
begin
- fail "exception in rescue clause"
+ raise "exception in rescue clause"
rescue
- fail $string
+ raise $string
end
ok(false)
rescue
@@ -217,9 +217,9 @@ end
# exception in ensure clause
begin
begin
- fail "this must be handled no.4"
+ raise "this must be handled no.4"
ensure
- fail "exception in ensure clause"
+ raise "exception in ensure clause"
end
ok(false)
rescue
@@ -229,7 +229,7 @@ end
$bad = true
begin
begin
- fail "this must be handled no.5"
+ raise "this must be handled no.5"
ensure
$bad = false
end
@@ -240,7 +240,7 @@ ok(!$bad)
$bad = true
begin
begin
- fail "this must be handled no.6"
+ raise "this must be handled no.6"
ensure
$bad = false
end
@@ -355,7 +355,7 @@ ok($x[1] == 2)
ok(begin
for k,v in $y
- fail if k*2 != v
+ raise if k*2 != v
end
true
rescue
@@ -746,7 +746,7 @@ if defined? Process.kill
sleep 0.1
ok($x == 2)
- trap "SIGINT", proc{fail "Interrupt"}
+ trap "SIGINT", proc{raise "Interrupt"}
x = false
begin