summaryrefslogtreecommitdiff
path: root/test/ruby/test_hash.rb
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2020-12-17 22:39:37 +0900
committerYusuke Endoh <mame@ruby-lang.org>2020-12-17 22:39:37 +0900
commitcaef364cc5e9816b398f46a7da50057707f87af3 (patch)
tree8bf53fbea4bd854e43aebfc20874925f9a200cee /test/ruby/test_hash.rb
parent980f994b3b349486c5e64b51241330d4c9fc63f1 (diff)
test/ruby: suppress some warnings
follow up to 9908177857a28633d6279c43a1ad4dfedcb98596
Diffstat (limited to 'test/ruby/test_hash.rb')
-rw-r--r--test/ruby/test_hash.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb
index 0e0bd565b9..c4b93836c6 100644
--- a/test/ruby/test_hash.rb
+++ b/test/ruby/test_hash.rb
@@ -877,7 +877,7 @@ class TestHash < Test::Unit::TestCase
def test_to_s
h = @cls[ 1 => 2, "cat" => "dog", 1.5 => :fred ]
assert_equal(h.inspect, h.to_s)
- $, = ":"
+ assert_deprecated_warning { $, = ":" }
assert_equal(h.inspect, h.to_s)
h = @cls[]
assert_equal(h.inspect, h.to_s)
@@ -1770,6 +1770,12 @@ class TestHash < Test::Unit::TestCase
@cls = SubHash
super
end
+
+ def test_reject
+ assert_warning(/extra states are no longer copied/) do
+ super
+ end
+ end
end
ruby2_keywords def get_flagged_hash(*args)