[前][次][番号順一覧][スレッド一覧]

ruby-changes:64145

From: Nobuyoshi <ko1@a...>
Date: Mon, 14 Dec 2020 19:29:52 +0900 (JST)
Subject: [ruby-changes:64145] 25cf1aca92 (master): Added continued line case

https://git.ruby-lang.org/ruby.git/commit/?id=25cf1aca92

From 25cf1aca927946595b1325e4fde7f642bba2a706 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 22 Oct 2020 16:25:28 +0900
Subject: Added continued line case


diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb
index d476a9d..4b6f422 100644
--- a/test/ruby/test_parse.rb
+++ b/test/ruby/test_parse.rb
@@ -1178,17 +1178,20 @@ 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, 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;'}")
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]