summaryrefslogtreecommitdiff
path: root/test/ruby/test_parse.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-10-09 20:06:30 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-14 19:19:16 +0900
commitb1bd223085d7b97d8de8679894a81b7993c26b28 (patch)
tree67ce568039110f8c6fc4190179983c6a6b66302a /test/ruby/test_parse.rb
parent7060d6b721092d56f1cbc084940db960e01671fd (diff)
Support shareable_constant_value pragma
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3681
Diffstat (limited to 'test/ruby/test_parse.rb')
-rw-r--r--test/ruby/test_parse.rb6
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")}}