diff options
author | yui-knk <[email protected]> | 2024-03-24 08:39:27 +0900 |
---|---|---|
committer | Yuichiro Kaneko <[email protected]> | 2024-04-02 08:26:58 +0900 |
commit | 799e854897856e431c03a5122252358e2c57aff2 (patch) | |
tree | 4918d58d1bdcdb229c2419d381743007b62e1d2d /test/ruby/test_literal.rb | |
parent | 8066e3ea6e9462f510e5d0da887be94b18cce50b (diff) |
[Feature #20331] Simplify parser warnings for hash keys duplication and when clause duplication
This commit simplifies warnings for hash keys duplication and when clause duplication,
based on the discussion of https://bugs.ruby-lang.org/issues/20331.
Warnings are reported only when strings are same to ohters.
Diffstat (limited to 'test/ruby/test_literal.rb')
-rw-r--r-- | test/ruby/test_literal.rb | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/test/ruby/test_literal.rb b/test/ruby/test_literal.rb index 61e1e096df..c6154af1f6 100644 --- a/test/ruby/test_literal.rb +++ b/test/ruby/test_literal.rb @@ -509,9 +509,6 @@ class TestRubyLiteral < Test::Unit::TestCase ) do |key| assert_warning(/key #{Regexp.quote(eval(key).inspect)} is duplicated/) { eval("{#{key} => :bar, #{key} => :foo}") } end - - assert_warning(/key 1 is duplicated/) { eval("{__LINE__ => :bar, 1 => :foo}") } - assert_warning(/key \"FILENAME\" is duplicated/) { eval("{__FILE__ => :bar, 'FILENAME' => :foo}", binding, "FILENAME") } end def test_hash_frozen_key_id |