Logan Barnett wrote:
Is the compiler executing this script instead of running it then? All the requires go through, mixins are applied, etc, right?

That is correct! And the resulting class, as part of its static initialization, requires the same file you compile with. So if you tell the compiler to create Java class X from Ruby class Y by requiring library zzz, the resulting X class will do a require 'zzz' when it loads. That ensures that the Ruby class metadata is all primed, and the methods are all ready to go.

The specifics of how this all fits into the compiler are up for debate, but obviously since compiler2 is only about 180 lines of Ruby code, it will be easy for you all to submit fixes and enhancements. Please have a look at it, it's very simple!

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to