From: daz Date: 2009-11-21T14:42:19+09:00 Subject: [ruby-core:26853] Re: Internals: #to_s .vs. #to_str? Kurt Stephens wrote: > Is there a description of the semantic differences between #to_s and > #to_str? Are there any particular constraints on the results of these > methods? Is it considered "legal" to return frozen Strings in some > cases for either of the two? Is one used internal for implicit casts? > > I have some ideas that may reduce GC work and improve large String > concatenation. > > I do remember a discussion about the differences between #to_a and > #to_ary, but I don't quite remember why they are semantically different. > > Thanks, > Kurt > > Here's a start ... http://forums.pragprog.com/forums/54/topics/992 daz