From: "Daniel Schüle" Date: 2005-11-07T00:47:10+09:00 Subject: Re: what does --can't define singleton method-- mean? > irb(main):005:0> class << c > irb(main):006:1> def angle > irb(main):007:2> (arg/Math::PI)*180 > irb(main):008:2> end > irb(main):009:1> end > TypeError: can't define singleton method "angle" for Complex > from (irb):6 > from :0 > irb(main):010:0> c.arg > => 0.785398163397448 > irb(main):011:0> c.angle > => 45.0 I think the error message is misleading, because class << c def angle;end end should add a singleton method to instance c or overwrite the behavior of inherited method as expected the behaviuor of c.angle is changed it should not "define singleton method for Complex" Regards, Daniel