From: Ryan Davis Date: 2011-03-02T17:02:58+09:00 Subject: Re: Module question On Mar 1, 2011, at 23:46 , JP Billaud wrote: > Hey, > > I have been looking around about Module etc... and all I can read is > that Module cannot be instantiated. However the following code works > just fine with Ruby 1.8.7: > > == > mod = Module.new > == > > Am I missing something obvious? Kinda... >> class X; end => nil >> X.new => # >> Y = Class.new => Y >> Y.new => # >> Class.new => # >> Class.new.new => #<#:0x100364f10> vs: >> Z = Module.new => Z >> Module.new => # >> Z.new NoMethodError: undefined method `new' for Z:Module from (irb):11 >> Module.new.new NoMethodError: undefined method `new' for # from (irb):6