Remove implicit conversion using to_str method; fix #3854

We have added internal convenience method `__to_str` which
does string type check.

The issue #3854 was fixed but fundamental flaw of lack of stack
depth check along with fibers still remains. Use `MRB_GC_FIXED_ARENA`
for workaround.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2018-09-19 21:51:53 +09:00
parent afca99a40b
commit ff08856fe3
13 changed files with 60 additions and 114 deletions
-13
View File
@@ -253,19 +253,6 @@ assert('String#chomp!', '15.2.10.5.10') do
assert_equal 'abc', e
end
assert('String#chomp! uses the correct length') do
class A
def to_str
$s.replace("AA")
"A"
end
end
$s = "AAA"
$s.chomp!(A.new)
assert_equal $s, "A"
end
assert('String#chop', '15.2.10.5.11') do
a = ''.chop
b = 'abc'.chop