aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_hash.rb
diff options
context:
space:
mode:
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)