"HelloTree, Inc." wrote:
> It isn't finding 'myLoad', and so is generating a NameError.  This works in
> normal Ruby, but not mod_ruby.  Could someone explain to me why this is, and
> how I could just make a simple globally accessible method like this one?

It might be the wrapping of the mod_ruby code in an anonymous namespace
that is the reason. This could mean that the Object class you are
defining isn't the Object class you are expecting, i.e. you are making a
new Object class inside a namespace (more specifically, a module).

Search for the "mod_ruby and module space" thread on rubytalk for more
details.

> BTW, if I make it a class method of Object, then Object.myLoad works just
> fine.

That is rather odd, and seems to go counter to my point above.
Do you use 
  class Object; def self.myLoad #etc
or the singleton method way
  def Object.myLoad #etc
of defining the class method?

-- 
(\[ Kent Dahl ]/)_    _~_    __[ http://www.stud.ntnu.no/~kentda/ ]___/~
 ))\_student_/((  \__d L b__/  NTNU - graduate engineering - 5. year  )
( \__\_õüõß/__/ ) _)Industrial economics and technological management(
 \____/_öß\____/ (____engineering.discipline_=_Computer::Technology___)