runtime.defineGlobalConstant("RUBY_REVISION", runtime.newFixnum(Constants.RUBY_REVISION));
RubyInstanceConfig.Verbosity verbosity = runtime.getInstanceConfig().getVerbosity();
runtime.defineVariable(new WarningGlobalVariable(runtime, "$-W", verbosity), GLOBAL);
final GlobalVariable kcodeGV;
kcodeGV = new NonEffectiveGlobalVariable(runtime, "$KCODE", runtime.getNil());
runtime.defineVariable(kcodeGV, GLOBAL);
runtime.defineVariable(new GlobalVariable.Copy(runtime, "$-K", kcodeGV), GLOBAL);
IRubyObject defaultRS = runtime.newString(runtime.getInstanceConfig().getRecordSeparator()).freeze(context);
GlobalVariable rs = new StringGlobalVariable(runtime, "$/", defaultRS);
runtime.defineVariable(rs, GLOBAL);
runtime.setRecordSeparatorVar(rs);
globals.setDefaultSeparator(defaultRS);
runtime.defineVariable(new StringGlobalVariable(runtime, "$\\", runtime.getNil()), GLOBAL);
runtime.defineVariable(new StringGlobalVariable(runtime, "$,", runtime.getNil()), GLOBAL);
runtime.defineVariable(new LineNumberGlobalVariable(runtime, "$."), GLOBAL);
runtime.defineVariable(new LastlineGlobalVariable(runtime, "$_"), FRAME);
runtime.defineVariable(new LastExitStatusVariable(runtime, "$?"), THREAD);
runtime.defineVariable(new ErrorInfoGlobalVariable(runtime, "$!", runtime.getNil()), THREAD);
runtime.defineVariable(new NonEffectiveGlobalVariable(runtime, "$=", runtime.getFalse()), GLOBAL);
if(runtime.getInstanceConfig().getInputFieldSeparator() == null) {
runtime.defineVariable(new GlobalVariable(runtime, "$;", runtime.getNil()), GLOBAL);
} else {
runtime.defineVariable(new GlobalVariable(runtime, "$;", RubyRegexp.newRegexp(runtime, runtime.getInstanceConfig().getInputFieldSeparator(), new RegexpOptions())), GLOBAL);
}
RubyInstanceConfig.Verbosity verbose = runtime.getInstanceConfig().getVerbosity();
IRubyObject verboseValue = null;
if (verbose == RubyInstanceConfig.Verbosity.NIL) {