From: Daniel Schierbeck Date: 2005-12-19T22:32:47+09:00 Subject: Re: shortcut to self.class ? Mark J. Reed wrote: > Without writing my own alias, is there an easy way to get the class of > the current object without calling self.class? I'm trying to call class > methods from within an instance method, and self.class.method_name is > just a little verbose for my taste. I could do type.method_name, but > that's deprecated and not very clear. It would be nice if just class > by itself were understood in context as the method instead of the keyword, > but since it's not, I'm sort of stuck. Suggestions? I think it's a good idea to allow `class' to be called from within methods if there's a dot after it class.some_method # legal class # illegal, or rather, creates a new class I also think that `when' should only be reserved when inside a case statement. There's no need to reserve words in places where they're not going to be used for that purpose anyway. Cheers, Daniel