From 7a5e7e8187761bcb1995dfcd16aeda05665e26e9 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sun, 9 Apr 2017 23:08:26 +0200 Subject: [PATCH] Fixed #10. --- src/rba/rba.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rba/rba.cc b/src/rba/rba.cc index 336f607d4..74333c3f6 100644 --- a/src/rba/rba.cc +++ b/src/rba/rba.cc @@ -1698,7 +1698,7 @@ RubyInterpreter::initialize (int main_argc, char **main_argv, int (*main_func) ( // Remove setters for $0 and $PROGRAM_NAME (still both are linked) because // the setter does strange things with the process and the argv, specifically argv[0] above. static VALUE argv0 = Qnil; - argv0 = rb_gv_get("0"); + argv0 = c2ruby (main_argv [0]); rb_define_hooked_variable("$0", &argv0, 0, 0); rb_define_hooked_variable("$PROGRAM_NAME", &argv0, 0, 0);