Skip to content

Commit

Permalink
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/src/main/java/org/jruby/RubyFloat.java
Original file line number Diff line number Diff line change
@@ -198,11 +198,13 @@ public int signum() {
}

@Override
@JRubyMethod(name = "negative?")
public IRubyObject isNegative(ThreadContext context) {
return context.runtime.newBoolean(signum() < 0);
}

@Override
@JRubyMethod(name = "positive?")
public IRubyObject isPositive(ThreadContext context) {
return context.runtime.newBoolean(signum() > 0);
}
@@ -232,7 +234,7 @@ public static IRubyObject induced_from(ThreadContext context, IRubyObject recv,
/** flo_to_s
*
*/
@JRubyMethod(name = "to_s")
@JRubyMethod(name = {"to_s", "inspect"})
@Override
public IRubyObject to_s() {
final Ruby runtime = getRuntime();
@@ -373,7 +375,7 @@ public IRubyObject op_div(ThreadContext context, double other) { // don't overri
/** flo_quo
*
*/
@JRubyMethod(name = "quo")
@JRubyMethod(name = {"quo", "fdiv"})
public IRubyObject quo(ThreadContext context, IRubyObject other) {
return numFuncall(context, this, sites(context).op_quo, other);
}
@@ -474,7 +476,7 @@ public IRubyObject op_pow19(ThreadContext context, IRubyObject other) {
/** flo_eq
*
*/
@JRubyMethod(name = "==", required = 1)
@JRubyMethod(name = {"==", "==="}, required = 1)
@Override
public IRubyObject op_equal(ThreadContext context, IRubyObject other) {
if (Double.isNaN(value)) {

0 comments on commit 0f3746b

Please sign in to comment.