From: matz@... (Yukihiro Matsumoto) Date: 2003-06-30T17:36:34+09:00 Subject: Re: Memory behavior of String#dup Hi, In message "Memory behavior of String#dup" on 03/06/30, "Robert Klemme" writes: |does String#dup also copy the byte sequence of the string or does it only |copy a reference and does a copy on write? When memory is already shared between strings, it does copy-on-write, otherwise it copies. From my observation, many of duped strings are modified right after the dup, so that I felt it is wise to avoid making new internal copy-on-write entries for duping. matz.