From: "Jan E." Date: 2012-04-19T03:00:50+09:00 Subject: Re: Why must I know whether I extend a class or a module? Hi, The syntax you're talking about is used both for defining and modifying a class/module. That's why there's an explicit "class" or "module" keyword in it. If you don't want to distinguish between a class and a module, use the class_eval method. This works for both: #### module M; end M.class_eval do def test puts 1 end end #### However, I can barely imagine this problem will ever occur in reality. I mean: Do you really add methods to objects you don't even know? -- Posted via http://www.ruby-forum.com/.