:rip.to_i
Ruby symbols have always been immediate objects. That means that, inside the interpreter, they were represented as small integers which references the corresponding symbol text in a lookup table. This made them fast, but it also left code open to denial of service attacks (particular in the context of web applications)—malicious clients could force server code to create arbitrary numbers of symbol table entries, and these were never garbage collected.Some recent changes in Ruby 1.9 point to the transition away from symbols being immediate objects. In particular, they lose their
integer representation, and hence the methods Fixnum.id2name, Fixnum.to_sym, and Symbol.to_i have been removed. I'm expecting to see symbols migrate to the heap as 1.9 continues to evolve.
by Genís