/** * Variation of getValue that checks for nulls, returning and setting the given value (presumably nil) */ public IRubyObject getValueOrNil(int offset, int depth, IRubyObject nil) { return parent.getValueOrNil(offset, depth - 1, nil); }
/** * Variation of getValue that checks for nulls, returning and setting the given value (presumably nil) */ public IRubyObject getValueOrNil(int offset, int depth, IRubyObject nil) { return parent.getValueOrNil(offset, depth - 1, nil); }
/** * Variation of getValue that checks for nulls, returning and setting the given value (presumably nil) */ public IRubyObject getValueOrNil(int offset, int depth, IRubyObject nil) { if (depth > 0) { return parent.getValueOrNil(offset, depth - 1, nil); } else { return getValueDepthZeroOrNil(offset, nil); } }
/** * Variation of getValue that checks for nulls, returning and setting the given value (presumably nil) */ public IRubyObject getValueOrNil(int offset, int depth, IRubyObject nil) { if (depth > 0) { return parent.getValueOrNil(offset, depth - 1, nil); } else { return getValueDepthZeroOrNil(offset, nil); } }
/** * Variation of getValue that checks for nulls, returning and setting the given value (presumably nil) */ public IRubyObject getValueOrNil(int offset, int depth, IRubyObject nil) { if (depth > 0) { return parent.getValueOrNil(offset, depth - 1, nil); } else { return getValueDepthZeroOrNil(offset, nil); } }
/** * Variation of getValue that checks for nulls, returning and setting the given value (presumably nil) */ @Override public IRubyObject getValueOrNil(int offset, int depth, IRubyObject nil) { if (depth > 0) { return parent.getValueOrNil(offset, depth - 1, nil); } else { return getValueDepthZeroOrNil(offset, nil); } }
/** * Variation of getValue that checks for nulls, returning and setting the given value (presumably nil) */ public IRubyObject getValueOrNil(int offset, int depth, IRubyObject nil) { if (depth > 0) { return parent.getValueOrNil(offset, depth - 1, nil); } else { return getValueDepthZeroOrNil(offset, nil); } }
/** * Variation of getValue that checks for nulls, returning and setting the given value (presumably nil) */ @Override public IRubyObject getValueOrNil(int offset, int depth, IRubyObject nil) { if (depth > 0) { return parent.getValueOrNil(offset, depth - 1, nil); } else { return getValueDepthZeroOrNil(offset, nil); } }
/** * Variation of getValue that checks for nulls, returning and setting the given value (presumably nil) */ @Override public IRubyObject getValueOrNil(int offset, int depth, IRubyObject nil) { if (depth > 0) { return parent.getValueOrNil(offset, depth - 1, nil); } else { return getValueDepthZeroOrNil(offset, nil); } }
/** * Variation of getValue that checks for nulls, returning and setting the given value (presumably nil) */ public IRubyObject getValueOrNil(int offset, int depth, IRubyObject nil) { if (depth > 0) { return parent.getValueOrNil(offset, depth - 1, nil); } else { return getValueDepthZeroOrNil(offset, nil); } }
/** * Variation of getValue that checks for nulls, returning and setting the given value (presumably nil) */ public IRubyObject getValueOrNil(int offset, int depth, IRubyObject nil) { if (depth > 0) { return parent.getValueOrNil(offset, depth - 1, nil); } else { return getValueDepthZeroOrNil(offset, nil); } }
/** * Variation of getValue that checks for nulls, returning and setting the given value (presumably nil) */ public IRubyObject getValueOrNil(int offset, int depth, IRubyObject nil) { if (depth > 0) { return parent.getValueOrNil(offset, depth - 1, nil); } else { return getValueDepthZeroOrNil(offset, nil); } }
/** * Variation of getValue that checks for nulls, returning and setting the given value (presumably nil) */ @Override public IRubyObject getValueOrNil(int offset, int depth, IRubyObject nil) { if (depth > 0) { return parent.getValueOrNil(offset, depth - 1, nil); } else { return getValueDepthZeroOrNil(offset, nil); } }
/** * Variation of getValue that checks for nulls, returning and setting the given value (presumably nil) */ @Override public IRubyObject getValueOrNil(int offset, int depth, IRubyObject nil) { if (depth > 0) { return parent.getValueOrNil(offset, depth - 1, nil); } else { return getValueDepthZeroOrNil(offset, nil); } }
/** * Variation of getValue that checks for nulls, returning and setting the given value (presumably nil) */ @Override public IRubyObject getValueOrNil(int offset, int depth, IRubyObject nil) { if (depth > 0) { return parent.getValueOrNil(offset, depth - 1, nil); } else { return getValueDepthZeroOrNil(offset, nil); } }
/** * Variation of getValue that checks for nulls, returning and setting the given value (presumably nil) */ public IRubyObject getValueOrNil(int offset, int depth, IRubyObject nil) { if (depth > 0) { return parent.getValueOrNil(offset, depth - 1, nil); } else { return getValueDepthZeroOrNil(offset, nil); } }
@JRubyMethod public IRubyObject local_variable_get(ThreadContext context, IRubyObject symbol) { String name = symbol.asJavaString().intern(); DynamicScope evalScope = binding.getEvalScope(context.runtime); int slot = evalScope.getStaticScope().isDefined(name); if (slot == -1) throw context.runtime.newNameError("local variable `" + name + "' not defined for " + inspect(), name); return evalScope.getValueOrNil(slot & 0xffff, slot >> 16, context.nil); }
@JRubyMethod public IRubyObject local_variable_get(ThreadContext context, IRubyObject symbol) { String name = symbol.asJavaString().intern(); DynamicScope evalScope = binding.getEvalScope(context.runtime); int slot = evalScope.getStaticScope().isDefined(name); if (slot == -1) throw context.runtime.newNameError("local variable `" + name + "' not defined for " + inspect(), name); return evalScope.getValueOrNil(slot & 0xffff, slot >> 16, context.nil); }