diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-15 02:01:59 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-15 02:01:59 +0000 |
commit | 581be44edea511652692f2a609264f55b27b7c9a (patch) | |
tree | 5bf1a967821813f83db06080100995b8f8fbd108 /test/ruby | |
parent | 92e3ffdf780728719125c64709a6b2fb95185e71 (diff) | |
download | ruby-581be44edea511652692f2a609264f55b27b7c9a.tar.gz |
object.c: fix conversion failure message
* object.c (convert_type_with_id): fix failure message for
explicit conversion. rb_convert_type_with_id and
rb_check_convert_type_with_id are not only for implicit
conversions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_object.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_object.rb b/test/ruby/test_object.rb index e7d623283f..e55a09dc23 100644 --- a/test/ruby/test_object.rb +++ b/test/ruby/test_object.rb @@ -923,6 +923,7 @@ class TestObject < Test::Unit::TestCase _issue = "Bug #7539" assert_raise_with_message(TypeError, "can't convert Array into Integer") {Integer([42])} assert_raise_with_message(TypeError, 'no implicit conversion of Array into Integer') {[].first([42])} + assert_raise_with_message(TypeError, "can't convert Array into Rational") {Rational([42])} end def test_copied_ivar_memory_leak |