summaryrefslogtreecommitdiff
path: root/test/ruby/test_regexp.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-09 08:43:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-09 08:43:12 +0000
commit9ef55da91006a19dc4fb612c735b335175b3259b (patch)
treed1b5676b11b6cf64709f040c2c1b4aba60da02fe /test/ruby/test_regexp.rb
parent289d6bb30f4c2fffa2437436030c889f10522e72 (diff)
test/unit/assertions.rb: return exception
* lib/test/unit/assertions.rb (assert_raise_with_message): return raised exception same as assert_raise. * test/ruby, test/-ext-: use assert_raise_with_message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_regexp.rb')
-rw-r--r--test/ruby/test_regexp.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb
index 1f2a4d13a8..b0efe38d8c 100644
--- a/test/ruby/test_regexp.rb
+++ b/test/ruby/test_regexp.rb
@@ -946,8 +946,9 @@ class TestRegexp < Test::Unit::TestCase
def test_error_message_on_failed_conversion
bug7539 = '[ruby-core:50733]'
assert_equal false, /x/=== 42
- err = assert_raise(TypeError){ Regexp.quote(42) }
- assert_equal 'no implicit conversion of Fixnum into String', err.message, bug7539
+ assert_raise_with_message(TypeError, 'no implicit conversion of Fixnum into String', bug7539) {
+ Regexp.quote(42)
+ }
end
def test_conditional_expression