summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_literal.rb3
-rw-r--r--test/ruby/test_syntax.rb4
2 files changed, 2 insertions, 5 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
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb
index 371c41fe37..7cc5e542a7 100644
--- a/test/ruby/test_syntax.rb
+++ b/test/ruby/test_syntax.rb
@@ -734,7 +734,7 @@ WARN
end
}
}
- assert_warning(/3: #{w}.+4: #{w}.+4: #{w}.+5: #{w}.+5: #{w}/m) {
+ assert_warning(/3: #{w}/m) {
eval %q{
case 1
when __LINE__, __LINE__
@@ -743,7 +743,7 @@ WARN
end
}
}
- assert_warning(/3: #{w}.+4: #{w}.+4: #{w}.+5: #{w}.+5: #{w}/m) {
+ assert_warning(/3: #{w}/m) {
eval %q{
case 1
when __FILE__, __FILE__