rubyists (we need something like 'perl mongers') -

can anyone confirm that it is not possible to call

  1.extend aModule

and, if so, suggest a work around?

i have found several threads touching on this subject, but no definitive
answer.  i find it odd that one can

  class Object
    def foo
      'bar'
    end
  end

1.foo

but not

  module ObjectMethods
    def foo
      'bar'
    end
  end

i = 1
i.extend ObjectMethods

which will give

TypeError: can't define singleton

i understand that Fixnums are immeadiate, and thus may not 'point' to a symbol
table, but then how do the lookups into class Object's symbol table work?

-ara


-- 

 ====================================
 | Ara Howard
 | NOAA Forecast Systems Laboratory
 | Information and Technology Services
 | Data Systems Group
 | R/FST 325 Broadway
 | Boulder, CO 80305-3328
 | Email: ahoward / fsl.noaa.gov
 | Phone:  303-497-7238
 | Fax:    303-497-7259
 ====================================