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

ruby-changes:67940

From: Nobuyoshi <ko1@a...>
Date: Sat, 11 Sep 2021 19:10:02 +0900 (JST)
Subject: [ruby-changes:67940] 7899866849 (master): Another test for [Feature #14579]

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

From 7899866849c1bac708e513e5d9e14467a0155a9e Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sat, 11 Sep 2021 19:07:02 +0900
Subject: Another test for [Feature #14579]

The value of the dynamic key cannot be omitted for now.
---
 test/ruby/test_hash.rb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb
index 5aee1b5..af78e2f 100644
--- a/test/ruby/test_hash.rb
+++ b/test/ruby/test_hash.rb
@@ -2184,6 +2184,7 @@ class TestHash < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_hash.rb#L2184
     y = 2
     assert_equal({x: 1, y: 2}, {x:, y:})
     assert_equal({one: 1, two: 2}, {one:, two:})
+    assert_syntax_error('{"#{x}":}', /'\}'/)
   end
 
   private
-- 
cgit v1.1


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

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