/** * Invoked by JRuby when the map should be copied. * @return */ public Object dup() { return new RubyHashMapDecorator((RubyHash) rubyHash.dup()); } }
/** * Invoked by JRuby when the map should be copied. * @return */ public Object dup() { return new RubyHashMapDecorator((RubyHash) rubyHash.dup()); } }
@JRubyMethod(name = { "symbol_map", "to_h", "to_hash" }) public final IRubyObject symbol_map(ThreadContext context) { return kv_map.dup(context); }
/** rb_hash_reject * */ public RubyHash rejectInternal(ThreadContext context, Block block) { return ((RubyHash)dup()).delete_ifInternal(context, block); }
/** rb_hash_reject * */ public RubyHash rejectInternal(ThreadContext context, Block block) { return ((RubyHash)dup()).delete_ifInternal(context, block); }
@JRubyMethod(name = { "symbol_map", "to_h", "to_hash" }) public final IRubyObject symbol_map(ThreadContext context) { return kv_map.dup(context); }
@JRubyMethod(name = { "symbol_map", "to_h", "to_hash" }) public final IRubyObject symbol_map(ThreadContext context) { return kv_map.dup(context); }
@JRubyMethod(name = { "symbol_map", "to_h", "to_hash" }) public final IRubyObject symbol_map(ThreadContext context) { return kv_map.dup(context); }
@JRubyMethod(name = "compact") public IRubyObject compact(ThreadContext context) { IRubyObject res = dup(); ((RubyHash)res).compact_bang(context); return res; }
/** rb_hash_merge * */ @JRubyMethod public RubyHash merge(ThreadContext context, IRubyObject other, Block block) { return ((RubyHash)dup()).merge_bang(context, other, block); }
@JRubyMethod(name = "compact") public IRubyObject compact(ThreadContext context) { IRubyObject res = dup(); ((RubyHash)res).compact_bang(context); return res; }
/** rb_hash_merge * */ @JRubyMethod public RubyHash merge(ThreadContext context, IRubyObject other, Block block) { return ((RubyHash)dup()).merge_bang(context, other, block); }
/** rb_hash_merge * */ @JRubyMethod public RubyHash merge(ThreadContext context, IRubyObject other, Block block) { return ((RubyHash)dup()).merge_bang(context, other, block); }
/** rb_hash_merge * */ @JRubyMethod public RubyHash merge(ThreadContext context, IRubyObject other, Block block) { return ((RubyHash)dup()).merge_bang(context, other, block); }
@JRubyMethod public IRubyObject initialize_dup(ThreadContext context, IRubyObject orig) { super.initialize_copy(orig); setHash((RubyHash) (((RubySet) orig).hash).dup(context)); return this; }
@JRubyMethod public IRubyObject initialize_dup(ThreadContext context, IRubyObject orig) { super.initialize_copy(orig); setHash((RubyHash) (((RubySet) orig).hash).dup(context)); return this; }
@JRubyMethod(meta = true) public static IRubyObject list(ThreadContext context, IRubyObject recv) { Ruby runtime = recv.getRuntime(); RubyHash names; synchronized (recv) { names = (RubyHash) recv.getInternalVariables().getInternalVariable("signal_list"); if (names == null) { names = RubyHash.newHash(runtime); for (Map.Entry<String, Integer> sig : RubySignal.list().entrySet()) { names.op_aset(context, runtime.freezeAndDedupString(runtime.newString(sig.getKey())), runtime.newFixnum(sig.getValue())); } names.op_aset(context, runtime.freezeAndDedupString(runtime.newString("EXIT")), runtime.newFixnum(0)); recv.getInternalVariables().setInternalVariable("signal_list", names); } else { names.dup(context); } } return names; }
@JRubyMethod(meta = true) public static IRubyObject list(ThreadContext context, IRubyObject recv) { Ruby runtime = recv.getRuntime(); RubyHash names; synchronized (recv) { names = (RubyHash) recv.getInternalVariables().getInternalVariable("signal_list"); if (names == null) { names = RubyHash.newHash(runtime); for (Map.Entry<String, Integer> sig : RubySignal.list().entrySet()) { names.op_aset(context, runtime.freezeAndDedupString(runtime.newString(sig.getKey())), runtime.newFixnum(sig.getValue())); } names.op_aset(context, runtime.freezeAndDedupString(runtime.newString("EXIT")), runtime.newFixnum(0)); recv.getInternalVariables().setInternalVariable("signal_list", names); } else { names.dup(context); } } return names; }