Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/main/java/org/jruby/RubyHash.java
Original file line number Diff line number Diff line change
@@ -906,13 +906,13 @@ public void visit(IRubyObject key, IRubyObject value) {
public RubyProc to_proc(ThreadContext context) {
final BlockBody body = new BlockBody(Signature.ONE_ARGUMENT) {
@Override
protected IRubyObject doYield(ThreadContext context, IRubyObject key, Block block) {
protected IRubyObject doYield(ThreadContext context, Block block, IRubyObject key) {
// NOTE: the way currently RubyProc works this version is never dispatched!
return op_aref(context, key);
}

@Override
protected IRubyObject doYield(ThreadContext context, IRubyObject[] args, IRubyObject self, Block block) {
protected IRubyObject doYield(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self) {
// NOTE: at this point we get the args normalized into [ one ]
// signature.checkArity(context.runtime, args);
return op_aref(context, args[0]);
@@ -932,7 +932,7 @@ public StaticScope getStaticScope() {
@Override
public void setStaticScope(StaticScope newScope) { /* noop */ }
};

return new StrictProc(context.runtime, new Block(body, context.currentBinding()));
}

0 comments on commit 5096fee

Please sign in to comment.