Skip to content

Commit

Permalink
Fix BigDecimal warnings
Browse files Browse the repository at this point in the history
* Happens when running spec/ffi/long_double_spec.rb:
  warning: BigDecimal.new is deprecated; use BigDecimal() method instead.
  • Loading branch information
eregon committed Mar 25, 2020
1 parent 7f00ebe commit bb33ee8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/ffi_c/LongDouble.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rbffi_longdouble_new(long double ld)

if (RTEST(rb_cBigDecimal) && rb_cBigDecimal != rb_cObject) {
char buf[128];
return rb_funcall(rb_cBigDecimal, rb_intern("new"), 1, rb_str_new(buf, sprintf(buf, "%.35Le", ld)));
return rb_funcall(rb_mKernel, rb_intern("BigDecimal"), 1, rb_str_new(buf, sprintf(buf, "%.35Le", ld)));
}

/* Fall through to handling as a float */
Expand Down

0 comments on commit bb33ee8

Please sign in to comment.