News for hackers. Stuff that matters.
Re:Yehuda Katz's 10 Favorite Things About Ruby by tptacek on Monday August 24, 2009 @09:04PM (#783849)
Fixnums have a different representation in the interpreter (at least in 1.8 MRI) than normal objects do, which is probably what tripped me up here.
Re:Yehuda Katz's 10 Favorite Things About Ruby by wycats on Tuesday August 25, 2009 @12:04PM (#785092)
Yeah. Conceptually, you can think of the difference as whether or not there can be two copies of something. There can only be one copy of a Symbol, Fixnum, true, false, and nil. This means that true == true, and true.dup #=> error.