mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 15:36:16 +02:00
* 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
This commit is contained in:
parent
bb385e2386
commit
35b88be02b
5 changed files with 103 additions and 75 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue