aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_regexp.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_regexp.rb')
-rw-r--r--test/ruby/test_regexp.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb
index 4853c41b86..b0da247f4f 100644
--- a/test/ruby/test_regexp.rb
+++ b/test/ruby/test_regexp.rb
@@ -941,6 +941,7 @@ class TestRegexp < Test::Unit::TestCase
assert_raise(TypeError) { MatchData.allocate.to_s }
assert_match(/^#<MatchData:.*>$/, MatchData.allocate.inspect)
assert_raise(TypeError) { MatchData.allocate.string }
+ assert_raise(TypeError) { MatchData.allocate.hash }
$~ = MatchData.allocate
assert_raise(TypeError) { $& }
assert_raise(TypeError) { $` }