I agree this is much cleaner; ideally everything should be done this way -- even core methods. The only trouble is the bootstrap process: some methods must be there before even the code below will work.

In rubinius -- have thay figured out a good mechanism to control bootstrap for this?

Kresten


On Jun 12, 2007, at 9:10 AM, Ola Bini wrote:


module Kernel
 attach_method "org.jruby.RubyKernel", "new_array", :Array, [:object]
 attach_method "org.jruby.RubyKernel", "new_float", :Float, [:object]
end

I think that would be much better than our current solution, and also easier for third party extension developers.



Kresten Krab Thorup, Ph.D.
CTO, Trifork

                WHO'S AT JAOO? - http://jaoo.dk
-----------------------------------------------------------------------
Trifork A/S, Margrethepladsen 3, 8000  Ã…rhus C, Denmark
Tel: +45 8732 8787 / Fax: +45 8732 8788 / Mob: +45 2343 4626



Reply via email to