summaryrefslogtreecommitdiff
path: root/test/ruby/test_literal.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2021-06-03 13:26:11 +0900
committerNobuyoshi Nakada <[email protected]>2021-06-03 15:11:18 +0900
commit9f3888d6a3387773c8707b7971ce64c60df33d36 (patch)
treefae4b74a9d319ec899399d84cb9d6bd43c27a480 /test/ruby/test_literal.rb
parent37eb5e74395f148782f7d67b5218fb2e66b113d7 (diff)
Warn more duplicate literal hash keys
Following non-special_const literals: * T_REGEXP
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4548
Diffstat (limited to 'test/ruby/test_literal.rb')
-rw-r--r--test/ruby/test_literal.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_literal.rb b/test/ruby/test_literal.rb
index ed93b74cff..579a39dee8 100644
--- a/test/ruby/test_literal.rb
+++ b/test/ruby/test_literal.rb
@@ -484,6 +484,7 @@ class TestRubyLiteral < Test::Unit::TestCase
'1.0r',
'1.0i',
'1.72723e-77',
+ '//',
) do |key|
assert_warning(/key #{Regexp.quote(eval(key).inspect)} is duplicated/) do
eval("{#{key} => :bar, #{key} => :foo}")