From bd046764e31267c83e7ae515d9bc7f09ffaa5b95 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 29 Mar 2023 18:42:46 +0900 Subject: [Bug #19549] Check for variables to be interpolated --- test/ruby/test_parse.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/ruby') 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")}} -- cgit v1.2.3