G
Griff
Hi folks,
What is the scope of execution of a plain old Ruby script?
For example, if you write a script that does not define any classes
and you use reflection to get the current class, you discover that it
is "Object".
Eg on Windows:
echo puts "#{self.class}" > temp.rb
ruby temp.rb
Object
I am interested in where this behavior is defined. I didn't see any
mention of this in the Pickaxe2 book, but I could have overlooked it.
What is the scope of execution of a plain old Ruby script?
For example, if you write a script that does not define any classes
and you use reflection to get the current class, you discover that it
is "Object".
Eg on Windows:
echo puts "#{self.class}" > temp.rb
ruby temp.rb
Object
I am interested in where this behavior is defined. I didn't see any
mention of this in the Pickaxe2 book, but I could have overlooked it.