aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_variable.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_variable.rb')
-rw-r--r--test/ruby/test_variable.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/ruby/test_variable.rb b/test/ruby/test_variable.rb
index 90afde19cb..3fba8d1884 100644
--- a/test/ruby/test_variable.rb
+++ b/test/ruby/test_variable.rb
@@ -105,9 +105,13 @@ class TestVariable < Test::Unit::TestCase
assert_empty(gv.grep(/\A(?!\$)/))
assert_nil($~)
assert_not_include(gv, :$1)
- /.*/ =~ "global"
+ /(\w)(\d)?(.)(.)(.)(.)(.)(.)(.)(.)(\d)?(.)/ =~ "globalglobalglobal"
assert_not_nil($~)
- assert_include(global_variables-gv, :$1)
+ gv = global_variables - gv
+ assert_include(gv, :$1)
+ assert_not_include(gv, :$2)
+ assert_not_include(gv, :$11)
+ assert_include(gv, :$12)
end
def test_global_variable_0