summaryrefslogtreecommitdiff
path: root/bootstraptest/test_syntax.rb
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-27 04:43:54 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-27 04:43:54 +0000
commitb0986a8f827cc97d7cf19b15c38fbdab794e34b9 (patch)
tree01e457b0aa89e3a4c67a05d29996b89f804d4275 /bootstraptest/test_syntax.rb
parent8e09ab045ff2cb241365ff03e3c7f02960c4f2e9 (diff)
* compile.c, insns.def: change return value of "defined?"
for $&, $1, ... . If such variables are defined, return "global-variable". * test/ruby/test_defined.rb: add tests. * bootstraptest/test_syntax.rb: fix a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_syntax.rb')
-rw-r--r--bootstraptest/test_syntax.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/bootstraptest/test_syntax.rb b/bootstraptest/test_syntax.rb
index 9541d67..b1517e6 100644
--- a/bootstraptest/test_syntax.rb
+++ b/bootstraptest/test_syntax.rb
@@ -248,7 +248,7 @@ assert_equal %q{["method", "method", "method", "method", nil, nil, "method", "me
end
C.new.test + [defined?(C.new.m3)]
}
-assert_equal %q{[nil, nil, nil, nil, "$1", "$2", nil, nil]}, %q{
+assert_equal %q{[nil, nil, nil, nil, "global-variable", "global-variable", nil, nil]}, %q{
$ans = [defined?($1), defined?($2), defined?($3), defined?($4)]
/(a)(b)/ =~ 'ab'
$ans + [defined?($1), defined?($2), defined?($3), defined?($4)]