summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-12-22 09:01:55 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-12-22 09:01:55 +0000
commit6d583574ab87c7cd18b66382c6892b545167bff6 (patch)
tree515b7c169ce2cd30fe085c5d861f5fad59aa76f7 /sample
parente299d511db939232c628d6880e61c32e83937d66 (diff)
1.1d1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1dev@357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r--sample/test.rb16
1 files changed, 4 insertions, 12 deletions
diff --git a/sample/test.rb b/sample/test.rb
index 8748b60b50..f28327659e 100644
--- a/sample/test.rb
+++ b/sample/test.rb
@@ -414,17 +414,6 @@ tt{|i| break if i == 5}
ok(i == 5)
# iterator break/redo/next/retry
-unless defined? loop
- def loop
- while true
- yield
- end
- end
- ok(false)
-else
- ok(true)
-end
-
done = true
loop{
break
@@ -685,10 +674,13 @@ ok(a == 1)
a, *b = 1, 2, 3
ok(a == 1 && b == [2, 3])
+a, (b, c), d = 1, [2, 3], 4
+ok(a == 1 && b == 2 && c == 3 && d == 4)
+
*a = 1, 2, 3
ok(a == [1, 2, 3])
-*a = 1..3
+*a = 1..3 # array conversion
ok(a == [1, 2, 3])
check "call"