Skip to content

Commit 4e2ce7d

Browse files
committed
Match interp behavior for JIT block params logic
1 parent 574c519 commit 4e2ce7d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

core/src/main/java/org/jruby/ir/runtime/IRRuntimeHelpers.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2189,7 +2189,7 @@ private static IRubyObject[] prepareBlockArgsInternal(ThreadContext context, Blo
21892189

21902190
// FIXME: For NORMAL/THREAD but it is unclear if we really need any keyword logic in here anymore.
21912191
org.jruby.runtime.Signature sig = block.getBody().getSignature();
2192-
if (!sig.isSpreadable()) return args;
2192+
if (!sig.isSpreadable() || (sig.opt() + sig.required() == 1 && !sig.hasRest())) return args;
21932193

21942194
// We get here only when we need both required and optional/rest args
21952195
// (keyword or non-keyword in either case).

0 commit comments

Comments
 (0)