summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-03-29 18:42:46 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-09-07 13:41:13 +0900
commitbd046764e31267c83e7ae515d9bc7f09ffaa5b95 (patch)
treef61fbddabeacd88d89de119629fd22c48c24dde4 /test
parent05aaff2191cbe777d1efb915ab9652eeaa1c16b8 (diff)
[Bug #19549] Check for variables to be interpolated
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7615
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_parse.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb
index cf989d190b..957a37eb81 100644
--- a/test/ruby/test_parse.rb
+++ b/test/ruby/test_parse.rb
@@ -1443,6 +1443,11 @@ x = __ENCODING__
assert_equal(expected, obj.arg)
end
+ def test_ungettable_gvar
+ assert_syntax_error('$01234', /not valid to get/)
+ assert_syntax_error('"#$01234"', /not valid to get/)
+ end
+
=begin
def test_past_scope_variable
assert_warning(/past scope/) {catch {|tag| eval("BEGIN{throw tag}; tap {a = 1}; a")}}