[MacRuby-devel] Compiled Ruby files

Laurent Sansonetti lsansonetti at apple.com
Tue Nov 2 01:25:56 PDT 2010


Hi Larry,

Indeed, the Ruby standard library is not entirely compiled, so you will find .rb files if the MacRuby framework is embedded into the application's bundle. We don't compile the whole standard library for historical reasons, as the AOT compiler wasn't stable enough to work on everything, but we may finally turn the switch on in the upcoming release.

However, your application's code should be compiled, and .rb files should be removed from the .app bundle for you, by macruby_deploy. If you still do find .rb files that belong to your project in the .app bundle, then there is a bug somewhere.

To confirm, yes it is okay to delete .rb files when there is a .rbo file in the same directory. More generally, MacRuby's #require will always pick .rbo files in priority over .rb files.

Laurent

On Nov 1, 2010, at 9:33 PM, Larry Wilson wrote:

> I've been poking around in the directories of a MacRuby-based app (that has been compiled via macruby-deploy) in the usr/lib/ruby subdirectories.  Why is there not an .rbo file for every .rb source file?  
> 
> Is it safe to delete the .rb files if there is a .rbo equivalent?
> 
> -Larry
> 
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20101102/dd8d9029/attachment.html>


More information about the MacRuby-devel mailing list