summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-10-22 16:25:28 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-14 19:19:16 +0900
commit25cf1aca927946595b1325e4fde7f642bba2a706 (patch)
treef3bed2c1573a5759978fdc3b09acd97830721c69
parent78cb9b627b19069abad5b27f1710abacf1eed064 (diff)
Added continued line case
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3681
-rw-r--r--test/ruby/test_parse.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb
index d476a9d62c..4b6f4222bc 100644
--- a/test/ruby/test_parse.rb
+++ b/test/ruby/test_parse.rb
@@ -1178,17 +1178,20 @@ x = __ENCODING__
assert_warning(/invalid value/) do
assert_valid_syntax("# shareable_constant_value: invalid-option", verbose: true)
end
- a, b = Class.new.class_eval("#{<<~"begin;"}\n#{<<~'end;'}")
+ a, b, c = Class.new.class_eval("#{<<~"begin;"}\n#{<<~'end;'}")
begin;
# shareable_constant_value: true
A = [[1]]
# shareable_constant_value: false
B = [[2]]
+ C = # shareable_constant_value: true
+ [[3]]
- [A, B]
+ [A, B, C]
end;
assert_send([Ractor, :shareable?, a])
assert_not_send([Ractor, :shareable?, b])
+ assert_send([Ractor, :shareable?, c])
assert_equal([1], a[0])
assert_send([Ractor, :shareable?, a[0]])
a, b = Class.new.class_eval("#{<<~"begin;"}\n#{<<~'end;'}")