Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More BigDecimal spec fixes in 1.9 mode.

  • Loading branch information...
commit 8dc285e628642b00cef25cf60baf2a50d8e285ba 1 parent 4f15939
@BanzaiMan BanzaiMan authored
View
1  spec/tags/1.9/ruby/library/bigdecimal/floor_tags.txt
@@ -1 +0,0 @@
-fails:BigDecimal#floor raise exception, if self is special value
View
7 src/org/jruby/RubyBigDecimal.java
@@ -991,6 +991,13 @@ public IRubyObject floor(IRubyObject[]args) {
return this;
}
}
+
+ @JRubyMethod(name = "floor", optional =1, compat = CompatVersion.RUBY1_9)
+ public IRubyObject floor19(IRubyObject[] args) {
+ if (isNaN || isInfinity())
+ throw getRuntime().newFloatDomainError("Computation results to '" + to_s(args).asJavaString() + "'");
+ return floor(args);
+ }
@JRubyMethod(name = "frac")
public IRubyObject frac() {
Please sign in to comment.
Something went wrong with that request. Please try again.