diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-09-19 21:51:53 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-09-19 22:01:59 +0900 |
| commit | e207d5af43e9d6e09679e9aee9bf00a843528e0e (patch) | |
| tree | 7f83038d199fc076b316d51654819ef6bad5fa78 /test/t/string.rb | |
| parent | c09d250ca148c0efc0167d55885bd20da87b43f7 (diff) | |
| download | mruby-e207d5af43e9d6e09679e9aee9bf00a843528e0e.tar.gz mruby-e207d5af43e9d6e09679e9aee9bf00a843528e0e.zip | |
Remove implicit conversion using `to_str` method.
We have added internal convenience method `__to_str` which
does string type check.
Diffstat (limited to 'test/t/string.rb')
| -rw-r--r-- | test/t/string.rb | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/test/t/string.rb b/test/t/string.rb index e91b915fe..3a1eced16 100644 --- a/test/t/string.rb +++ b/test/t/string.rb @@ -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 |
