Skip to content

Commit

Permalink
Remove LASTLINE requirement from fixed >0 arities
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed May 21, 2024
1 parent b5f94a9 commit 452e79b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions core/src/main/java/org/jruby/RubyIO.java
Original file line number Diff line number Diff line change
Expand Up @@ -1828,17 +1828,17 @@ public IRubyObject print(ThreadContext context) {
return print0(context, this);
}

@JRubyMethod(reads = LASTLINE)
@JRubyMethod
public IRubyObject print(ThreadContext context, IRubyObject arg0) {
return print1(context, this, arg0);
}

@JRubyMethod(reads = LASTLINE)
@JRubyMethod
public IRubyObject print(ThreadContext context, IRubyObject arg0, IRubyObject arg1) {
return print2(context, this, arg0, arg1);
}

@JRubyMethod(reads = LASTLINE)
@JRubyMethod
public IRubyObject print(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) {
return print3(context, this, arg0, arg1, arg2);
}
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/java/org/jruby/RubyKernel.java
Original file line number Diff line number Diff line change
Expand Up @@ -748,17 +748,17 @@ public static IRubyObject print(ThreadContext context, IRubyObject recv) {
return RubyIO.print0(context, context.runtime.getGlobalVariables().get("$>"));
}

@JRubyMethod(module = true, visibility = PRIVATE, reads = LASTLINE)
@JRubyMethod(module = true, visibility = PRIVATE)
public static IRubyObject print(ThreadContext context, IRubyObject recv, IRubyObject arg0) {
return RubyIO.print1(context, context.runtime.getGlobalVariables().get("$>"), arg0);
}

@JRubyMethod(module = true, visibility = PRIVATE, reads = LASTLINE)
@JRubyMethod(module = true, visibility = PRIVATE)
public static IRubyObject print(ThreadContext context, IRubyObject recv, IRubyObject arg0, IRubyObject arg1) {
return RubyIO.print2(context, context.runtime.getGlobalVariables().get("$>"), arg0, arg1);
}

@JRubyMethod(module = true, visibility = PRIVATE, reads = LASTLINE)
@JRubyMethod(module = true, visibility = PRIVATE)
public static IRubyObject print(ThreadContext context, IRubyObject recv, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) {
return RubyIO.print3(context, context.runtime.getGlobalVariables().get("$>"), arg0, arg1, arg2);
}
Expand Down

0 comments on commit 452e79b

Please sign in to comment.