/** * @see org.jruby.runtime.IAccessor#setValue(IRubyObject) */ public IRubyObject setValue(IRubyObject newValue) { assert newValue != null; globalVariable.setAccessor(new ValueAccessor(newValue)); return newValue; } }
/** defines a readonly global variable * */ public void defineReadonlyVariable(String name, IRubyObject value, org.jruby.internal.runtime.GlobalVariable.Scope scope) { globalVariables.defineReadonly(name, new ValueAccessor(value), scope); }
/** * @see org.jruby.runtime.IAccessor#setValue(IRubyObject) */ public IRubyObject setValue(IRubyObject newValue) { assert newValue != null; globalVariable.setAccessor(new ValueAccessor(newValue)); return newValue; } }
/** * @see org.jruby.runtime.IAccessor#setValue(IRubyObject) */ public IRubyObject setValue(IRubyObject newValue) { assert newValue != null; globalVariable.setAccessor(new ValueAccessor(newValue)); return newValue; } }
/** defines a readonly global variable * */ public void defineReadonlyVariable(String name, IRubyObject value, org.jruby.internal.runtime.GlobalVariable.Scope scope) { globalVariables.defineReadonly(name, new ValueAccessor(value), scope); }
/** defines a readonly global variable * */ public void defineReadonlyVariable(String name, IRubyObject value, org.jruby.internal.runtime.GlobalVariable.Scope scope) { globalVariables.defineReadonly(name, new ValueAccessor(value), scope); }
/** * @see org.jruby.runtime.IAccessor#setValue(IRubyObject) */ public IRubyObject setValue(IRubyObject newValue) { assert newValue != null; globalVariable.setAccessor(new ValueAccessor(newValue)); return newValue; } }
/** defines a readonly global variable * */ public void defineReadonlyVariable(String name, IRubyObject value, org.jruby.internal.runtime.GlobalVariable.Scope scope) { globalVariables.defineReadonly(name, new ValueAccessor(value), scope); }
IAccessor d = new ValueAccessor(newString(filename)); getGlobalVariables().define("$PROGRAM_NAME", d, GLOBAL); getGlobalVariables().define("$0", d, GLOBAL);
IAccessor d = new ValueAccessor(newString(filename)); getGlobalVariables().define("$PROGRAM_NAME", d, GLOBAL); getGlobalVariables().define("$0", d, GLOBAL);
public static void initARGV(Ruby runtime) { // define ARGV and $* for this runtime RubyArray argvArray = runtime.newArray(); String[] argv = runtime.getInstanceConfig().getArgv(); for (String arg : argv) { argvArray.append(RubyString.newInternalFromJavaExternal(runtime, arg)); } if (runtime.getObject().getConstantNoConstMissing("ARGV") != null) { ((RubyArray)runtime.getObject().getConstant("ARGV")).replace(argvArray); } else { runtime.getObject().setConstantQuiet("ARGV", argvArray); runtime.getGlobalVariables().define("$*", new ValueAccessor(argvArray), GLOBAL); } }
public static void initARGV(Ruby runtime) { // define ARGV and $* for this runtime RubyArray argvArray = runtime.newArray(); String[] argv = runtime.getInstanceConfig().getArgv(); for (String arg : argv) { argvArray.append(RubyString.newInternalFromJavaExternal(runtime, arg)); } if (runtime.getObject().getConstantNoConstMissing("ARGV") != null) { ((RubyArray)runtime.getObject().getConstant("ARGV")).replace(argvArray); } else { runtime.getObject().setConstantQuiet("ARGV", argvArray); runtime.getGlobalVariables().define("$*", new ValueAccessor(argvArray), GLOBAL); } }
public static void initARGV(Ruby runtime) { // define ARGV and $* for this runtime RubyArray argvArray = runtime.newArray(); String[] argv = runtime.getInstanceConfig().getArgv(); for (String arg : argv) { argvArray.append(RubyString.newInternalFromJavaExternal(runtime, arg)); } if (runtime.getObject().getConstantNoConstMissing("ARGV") != null) { ((RubyArray)runtime.getObject().getConstant("ARGV")).replace(argvArray); } else { runtime.getObject().setConstantQuiet("ARGV", argvArray); runtime.getGlobalVariables().define("$*", new ValueAccessor(argvArray), GLOBAL); } }
public static void initARGV(Ruby runtime) { // define ARGV and $* for this runtime RubyArray argvArray = runtime.newArray(); String[] argv = runtime.getInstanceConfig().getArgv(); for (String arg : argv) { argvArray.append(RubyString.newInternalFromJavaExternal(runtime, arg)); } if (runtime.getObject().getConstantNoConstMissing("ARGV") != null) { ((RubyArray)runtime.getObject().getConstant("ARGV")).replace(argvArray); } else { runtime.getObject().setConstantQuiet("ARGV", argvArray); runtime.getGlobalVariables().define("$*", new ValueAccessor(argvArray), GLOBAL); } }
IAccessor d = new ValueAccessor(newString(filename)); getGlobalVariables().define("$PROGRAM_NAME", d, GLOBAL); getGlobalVariables().define("$0", d, GLOBAL);
IAccessor d = new ValueAccessor(newString(filename)); getGlobalVariables().define("$PROGRAM_NAME", d, GLOBAL); getGlobalVariables().define("$0", d, GLOBAL);
IAccessor $0 = new ValueAccessor(RubyString.newString(runtime, filename)); runtime.getGlobalVariables().define("$PROGRAM_NAME", $0, GlobalVariable.Scope.GLOBAL); runtime.getGlobalVariables().define("$0", $0, GlobalVariable.Scope.GLOBAL);
IAccessor $0 = new ValueAccessor(RubyString.newString(runtime, filename)); runtime.getGlobalVariables().define("$PROGRAM_NAME", $0, GlobalVariable.Scope.GLOBAL); runtime.getGlobalVariables().define("$0", $0, GlobalVariable.Scope.GLOBAL);
IAccessor d = new ValueAccessor(RubyString.newString(runtime, filename)); runtime.getGlobalVariables().define("$PROGRAM_NAME", d, GlobalVariable.Scope.GLOBAL); runtime.getGlobalVariables().define("$0", d, GlobalVariable.Scope.GLOBAL);
IAccessor d = new ValueAccessor(RubyString.newString(runtime, filename)); runtime.getGlobalVariables().define("$PROGRAM_NAME", d, GlobalVariable.Scope.GLOBAL); runtime.getGlobalVariables().define("$0", d, GlobalVariable.Scope.GLOBAL);