Skip to content

Commit 94fde16

Browse files
committed
Enable TestParse#test_disallowed_gloal_variable MRI test case
1 parent b287e48 commit 94fde16

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

test/mri/excludes/TestParse.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
exclude :test_disallowed_class_variable, "/Users/andrykonchin/projects/truffleruby-ws/truffleruby/test/mri/tests/ruby/test_parse.rb:380:in `block in assert_disallowed_variable'."
2-
exclude :test_disallowed_gloal_variable, "https://github.com/ruby/prism/issues/2673"
32
exclude :test_disallowed_instance_variable, "/Users/andrykonchin/projects/truffleruby-ws/truffleruby/test/mri/tests/ruby/test_parse.rb:380:in `block in assert_disallowed_variable'."
43
exclude :test_dynamic_constant_assignment, "/Users/andrykonchin/projects/truffleruby-ws/truffleruby/test/mri/tests/ruby/test_parse.rb:155:in `test_dynamic_constant_assignment'."
54
exclude :test_else_without_rescue, "[\"/Users/andrykonchin/projects/truffleruby-ws/truffleruby/test/mri/tests/ruby/test_parse.rb\", 21]."

test/mri/tests/ruby/test_parse.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,10 @@ def test_dsym
377377

378378
def assert_disallowed_variable(type, noname, invalid)
379379
noname.each do |name|
380-
assert_syntax_error("proc{a = #{name} }", /`#{Regexp.escape noname[0]}' without identifiers is not allowed as #{type} variable name|`#{Regexp.escape noname[0]}' is not allowed as #{type} variable name/)
380+
assert_syntax_error("proc{a = #{name} }", /(`|')#{Regexp.escape noname[0]}' without identifiers is not allowed as #{type} variable name|(`|')#{Regexp.escape noname[0]}' is not allowed as #{type} variable name/)
381381
end
382382
invalid.each do |name|
383-
assert_syntax_error("proc {a = #{name} }", /`#{Regexp.escape name}' is not allowed as #{type} variable name|`#{Regexp.escape noname[0]}' is not allowed as #{type} variable name/)
383+
assert_syntax_error("proc {a = #{name} }", /(`|')#{Regexp.escape name}' is not allowed as #{type} variable name|(`|')#{Regexp.escape noname[0]}' is not allowed as #{type} variable name/)
384384
end
385385
end
386386

0 commit comments

Comments
 (0)