ruby-changes:64149
From: Nobuyoshi <ko1@a...>
Date: Mon, 14 Dec 2020 19:29:52 +0900 (JST)
Subject: [ruby-changes:64149] 78cb9b627b (master): Added false case
https://git.ruby-lang.org/ruby.git/commit/?id=78cb9b627b From 78cb9b627b19069abad5b27f1710abacf1eed064 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 22 Oct 2020 16:24:38 +0900 Subject: Added false case diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index 46c2ad5..d476a9d 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -1178,12 +1178,17 @@ x = __ENCODING__ https://github.com/ruby/ruby/blob/trunk/test/ruby/test_parse.rb#L1178 assert_warning(/invalid value/) do assert_valid_syntax("# shareable_constant_value: invalid-option", verbose: true) end - a = Class.new.class_eval("#{<<~"begin;"}\n#{<<~'end;'}") + a, b = Class.new.class_eval("#{<<~"begin;"}\n#{<<~'end;'}") begin; # shareable_constant_value: true A = [[1]] + # shareable_constant_value: false + B = [[2]] + + [A, B] end; assert_send([Ractor, :shareable?, a]) + assert_not_send([Ractor, :shareable?, b]) assert_equal([1], a[0]) assert_send([Ractor, :shareable?, a[0]]) a, b = Class.new.class_eval("#{<<~"begin;"}\n#{<<~'end;'}") -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/