From: Jim Weirich Date: 2008-07-22T02:05:15+09:00 Subject: [ruby-core:17898] Re: duping the NilClass On Jul 21, 2008, at 11:03 AM, Jim Weirich wrote: > (I would also not oppose a change that "extends" the definition of > dup to include returning self for immutable objects. Heh, this thought just came to me. We can explain :dup on nil (and other immutables) as implementing a copy on write strategy to duplication. And since these objects are immutable, we have optimized away all the overhead of actually tracking "copy on write" -- -- Jim Weirich -- jim.weirich@gmail.com