Actions
Feature #4468
closedString() should call to_str before to_s
Feature #4468:
String() should call to_str before to_s
Description
=begin
Integer() と Array() というカーネルメソッドはまず to_int/to_ary という
「暗黙の変換」のためのメソッドを呼び、それが失敗すると to_i/to_a を
呼んで変換するという仕様になっています。
しかし String() は最初から to_s を呼ぶようになっています。
統一感という意味ではまず to_str -> to_s の順に呼ぶことにしたほうが
良いのではないでしょうか。
to_str と to_s が異なる文字列を返すようなケースは思い浮ばないので、
実際にこれで結果が変化することはないのではないかと推測します。
=end
Actions