diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-30 07:42:04 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-30 07:42:04 +0000 |
| commit | 35b88be02b246357368dbcd5cdc83bf1dabef425 (patch) | |
| tree | a6c8b621e79d496d94c1425dde095c8e1732d6b9 /test/ruby/test_string.rb | |
| parent | bb385e23866f047b1dbbcc3f79fb9020c1fb6a5b (diff) | |
* vm_eval.c (rb_search_method_emtry, rb_method_call_status): split
from rb_call0().
* vm_eval.c (rb_check_funcall): get rid of raising exceptions and
hiding further exceptions. [ruby-dev:39584]
* vm_eval.c (rb_funcall_no_recursive): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_string.rb')
| -rw-r--r-- | test/ruby/test_string.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index f0688a342c..290f53634d 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -1408,6 +1408,18 @@ class TestString < Test::Unit::TestCase a = S("me") assert_equal("me", a.to_s) assert_equal(a.__id__, a.to_s.__id__) if @cls == String + + o = Object.new + def o.to_str + "at" + end + assert_equal("meat", a.concat(o)) + + o = Object.new + def o.to_str + foo_bar() + end + assert_match(/foo_bar/, assert_raise(NoMethodError) {a.concat(o)}.message) end def test_tr |
