From: "Chr. Rippel" Date: 2002-02-14T23:39:02+09:00 Subject: Re: Name resolution in Ruby "Yukihiro Matsumoto" wrote in > .... > Ruby already has features to prototype based programming, but it's not > practical since it does not allow singleton methods for immediates > (Fixnums, Symbols, Booleans, and nil). Hm, the following def x.foo; end where x == nil,false or true always worked - the interpreter only starts complaining if I do something like class << nil; end, but this is a pretty mood point since the NilClass and Boolean class are build in OO-Singleton classes anyway - and I can always write class NilClass Pointless = "Const" def each(*args); nil end class << self; def each_nil; yield nil end end end /Christoph