Skip to content

Commit

Permalink
Update for beginless ranges return value for Range#size
Browse files Browse the repository at this point in the history
  • Loading branch information
enebo committed May 15, 2024
1 parent 2028da3 commit 1072499
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyRange.java
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,7 @@ public IRubyObject size(ThreadContext context) {
if (end.isNil()) {
return dbl2num(context.runtime, Double.POSITIVE_INFINITY);
}
} else if (begin.isNil()) {
} else if (begin.isNil() && end instanceof RubyNumeric) {
return dbl2num(context.runtime, Double.POSITIVE_INFINITY);
}

Expand Down

0 comments on commit 1072499

Please sign in to comment.