Module question

J

JP Billaud

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?

Thanks,
 
R

Ryan Davis

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:0x100365028>:0x100364f10>

vs:
NoMethodError: undefined method `new' for Z:Module
from (irb):11NoMethodError: undefined method `new' for #<Module:0x10036f848>
from (irb):6
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,138
Messages
2,570,804
Members
47,349
Latest member
jojonoy597

Latest Threads

Top