Skip to content

Commit

Permalink
Merge branch 'master' into propagate_kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Apr 12, 2023
2 parents 4fe2c10 + 12a1ef3 commit 34deb2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/RubyIO.java
Original file line number Diff line number Diff line change
Expand Up @@ -3751,10 +3751,10 @@ private static IRubyObject foreachInternal(ThreadContext context, IRubyObject re

@JRubyMethod(name = "foreach", required = 1, optional = 3, meta = true, writes = LASTLINE)
public static IRubyObject foreach(final ThreadContext context, IRubyObject recv, IRubyObject[] args, final Block block) {
if (!block.isGiven()) return enumeratorize(context.runtime, recv, "foreach", args);

Arity.checkArgumentCount(context, args, 1, 4);

if (!block.isGiven()) return enumeratorize(context.runtime, recv, "foreach", args);

return foreachInternal(context, recv, args, block);
}

Expand Down

0 comments on commit 34deb2f

Please sign in to comment.