Skip to content

Commit

Permalink
Fix Fixnum#quo spec, where arg is a Bignum.
Browse files Browse the repository at this point in the history
  • Loading branch information
BanzaiMan committed Nov 23, 2011
1 parent 25d0500 commit fca0b1b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/org/jruby/RubyFixnum.java
Expand Up @@ -615,6 +615,8 @@ private IRubyObject divmodFixnum(ThreadContext context, IRubyObject other) {
public IRubyObject quo(ThreadContext context, IRubyObject other) {
if (other instanceof RubyFixnum) {
return RubyFloat.newFloat(context.getRuntime(), (double) value / (double) ((RubyFixnum) other).value);
} else if (other instanceof RubyBignum) {
return RubyFloat.newFloat(context.getRuntime(), (double) value / (double) ((RubyBignum) other).getDoubleValue());
}
return coerceBin(context, "quo", other);
}
Expand Down

0 comments on commit fca0b1b

Please sign in to comment.