Hi, (12/03/02 13:38), Aaron Patterson wrote: >> Seems that patch would break other subclasses of String, whose >> initialize_copy doesn't expect whole original string. > > When would this happen? With your patch: $ ./ruby -e 'class S < String; end; p S.new("abcdef")[0, 2]' "abcdef" > I noticed that String#replace == String#initialize_copy. Why is that? > Are people expected to write code like this? > > "foo".initialize_copy "bar" Of course no. initialize_copy is called by dup/clone methods. -- Nobu Nakada