diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-10-09 20:06:30 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-12-14 19:19:16 +0900 |
commit | b1bd223085d7b97d8de8679894a81b7993c26b28 (patch) | |
tree | 67ce568039110f8c6fc4190179983c6a6b66302a /test | |
parent | 7060d6b721092d56f1cbc084940db960e01671fd (diff) | |
download | ruby-b1bd223085d7b97d8de8679894a81b7993c26b28.tar.gz |
Support shareable_constant_value pragma
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_parse.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index 422a7cba58..1ed92d59a4 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -1174,6 +1174,12 @@ x = __ENCODING__ assert_equal(1, ex.message.scan(w).size, "same #{w.inspect} warning should be just once") end + def test_shareable_constant_value + assert_warning(/invalid value/) do + assert_valid_syntax("# shareable_constant_value: invalid-option", verbose: true) + end + end + =begin def test_past_scope_variable assert_warning(/past scope/) {catch {|tag| eval("BEGIN{throw tag}; tap {a = 1}; a")}} |