[macruby-changes] [3090] MacRuby/trunk/bin/rubyc
source_changes at macosforge.org
source_changes at macosforge.org
Tue Dec 8 18:21:12 PST 2009
Revision: 3090
http://trac.macosforge.org/projects/ruby/changeset/3090
Author: lsansonetti at apple.com
Date: 2009-12-08 18:21:10 -0800 (Tue, 08 Dec 2009)
Log Message:
-----------
don't forget to initialize the program name in AOT main functions
Modified Paths:
--------------
MacRuby/trunk/bin/rubyc
Modified: MacRuby/trunk/bin/rubyc
===================================================================
--- MacRuby/trunk/bin/rubyc 2009-12-09 02:12:40 UTC (rev 3089)
+++ MacRuby/trunk/bin/rubyc 2009-12-09 02:21:10 UTC (rev 3090)
@@ -178,6 +178,7 @@
void ruby_sysinit(int *, char ***);
void ruby_init(void);
void ruby_init_loadpath(void);
+ void ruby_script(const char *);
void ruby_set_argv(int, char **);
void rb_vm_init_compiler(void);
void *rb_vm_top_self(void);
@@ -190,6 +191,7 @@
int main(int argc, char **argv)
{
+ const char *progname = argv[0];
ruby_sysinit(&argc, &argv);
if (argc > 0) {
argc--;
@@ -199,6 +201,7 @@
ruby_init_loadpath();
ruby_set_argv(argc, argv);
rb_vm_init_compiler();
+ ruby_script(progname);
try {
void *self = rb_vm_top_self();
EOS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091208/069adf7f/attachment.html>
More information about the macruby-changes
mailing list