From: pluskid Date: 2007-12-13T23:35:06+09:00 Subject: Is there any way to redefine the `new' method? Hi! I'm writing a toy interpreter for scheme in Ruby. I created a class to represent scheme Symbol. And as the scheme Symbol, I want only one instance for symbols with the same name. I try to do it like this: class Symbol alias orig_new new def new(name) @@symbols[name] ||= orig_new(name) @@symbols[name] end end But I failed. It says `new' is undefined. Is there any way to do the tricky? Thanks!