R
RichardOnRails
Hi,
I posted my simple module and test file at http://www.pastie.org/2025300.
When I run my test under SciTE 1.74 with WinXP-Pro/SP3, I get the
results shown below. In short, I fail trying to include the module
using the name of the module or the name of the file hosting the
module.
Any correction to my misunderstanding would be most appreciated.
Thanks in Advance,
Richard
RUBYLIB = K:\_Projects\Ruby\_Ruby__KeyModules
Attempt to load MyMod
==========
uninitialized constant Object::MyMod
==========
Attempt to load SimpleMod
==========
uninitialized constant Object::SimpleMod
==========
List MyMod container, SimpleMod.rb
Path = K:\_Projects\Ruby\_Ruby__KeyModules\SimpleMod.rb
# SimpleMod.rb
# K:\_Projects\Ruby\_Ruby__KeyModules
module MyMod
def say_hello
puts "Hello from say_hello in MyMod"
end
end
I posted my simple module and test file at http://www.pastie.org/2025300.
When I run my test under SciTE 1.74 with WinXP-Pro/SP3, I get the
results shown below. In short, I fail trying to include the module
using the name of the module or the name of the file hosting the
module.
Any correction to my misunderstanding would be most appreciated.
Thanks in Advance,
Richard
RUBY_VERSION = 1.9.2ruby TestMyMod.rb
RUBYLIB = K:\_Projects\Ruby\_Ruby__KeyModules
Attempt to load MyMod
==========
uninitialized constant Object::MyMod
==========
Attempt to load SimpleMod
==========
uninitialized constant Object::SimpleMod
==========
List MyMod container, SimpleMod.rb
Path = K:\_Projects\Ruby\_Ruby__KeyModules\SimpleMod.rb
# SimpleMod.rb
# K:\_Projects\Ruby\_Ruby__KeyModules
module MyMod
def say_hello
puts "Hello from say_hello in MyMod"
end
end