Skip to content

Commit

Permalink
Showing 3 changed files with 4 additions and 3 deletions.
5 changes: 4 additions & 1 deletion core/src/main/java/org/jruby/RubyKernel.java
Original file line number Diff line number Diff line change
@@ -1268,7 +1268,10 @@ public static RubyProc proc(ThreadContext context, IRubyObject recv, Block block

@JRubyMethod(module = true, visibility = PRIVATE)
public static RubyProc lambda(ThreadContext context, IRubyObject recv, Block block) {
return context.runtime.newProc(Block.Type.LAMBDA, block);
// If we encounter a amp'd proc we leave it a proc for some reason.
Block.Type type = block.type == Block.Type.PROC ? block.type : Block.Type.LAMBDA;

return context.runtime.newProc(type, block);
}

@JRubyMethod(name = "proc", module = true, visibility = PRIVATE)
1 change: 0 additions & 1 deletion spec/tags/ruby/core/proc/hash_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/tags/ruby/core/proc/lambda_tags.txt

This file was deleted.

0 comments on commit 7e94aec

Please sign in to comment.