[MacRuby-devel] require module

Rob Gleeson rob at flowof.info
Mon Nov 29 12:26:49 PST 2010


On 29 Nov 2010, at 13:14, Alan Skipp wrote:

> Hi everyone,
> This is just a quick query about using 'include' in an xcode project.
> When creating an instance of a class, a 'require' statement is not needed beforehand, but to include a module, you must first require it.
> 
> #no need to require 'Foo'
> x = Foo.new 
> 
> # must require 'Bar' beforehand
> require 'bar'
> include Bar 
> 
> Should this behaviour be more consistent?
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Either you're using a core class, or a file is being required by you unknowingly. 
Check any calls to require() that you have in your project.

__
Rob







More information about the MacRuby-devel mailing list