summaryrefslogtreecommitdiff
path: root/bootstraptest/test_massign.rb
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-24 15:19:00 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-24 15:19:00 +0000
commitb285d26a16c90f8e2d491592e793c3b40545aaf1 (patch)
tree6f9d8371fe88457957cf5ed3cf25b8e3b2da2a1b /bootstraptest/test_massign.rb
parent901343a761e7868839e00c69ac142353db734d0e (diff)
* compile.c (compile_massign_opt): fix to skip massign optimization
with global variables. * bootstraptest/test_massign.rb: add some tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_massign.rb')
-rw-r--r--bootstraptest/test_massign.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/bootstraptest/test_massign.rb b/bootstraptest/test_massign.rb
index 202dbd3..c95c178 100644
--- a/bootstraptest/test_massign.rb
+++ b/bootstraptest/test_massign.rb
@@ -4,6 +4,14 @@ assert_equal '[[1], 2, 3]', '*v1,(*), (a, b) = [1,:x,[2, 3]]; [v1, a, b]'
assert_equal '[]', '*a = *nil; a'
assert_equal '[nil]', '*a = nil; a'
assert_equal '2', 'a, a = 1, 2; a', "[ruby-dev:31522]"
+assert_equal '[1, 2]', 'a, b = 1, 2'
+assert_equal '[1, 2]', %q{
+ ans = []
+ trace_var(:$a){|v| ans << v}
+ trace_var(:$b){|v| ans << v}
+ $a, $b = 1, 2
+ ans
+}
=begin
# generated by this script: