summaryrefslogtreecommitdiff
path: root/ext/bigdecimal/lib
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bigdecimal/lib')
-rw-r--r--ext/bigdecimal/lib/bigdecimal.rb5
-rw-r--r--ext/bigdecimal/lib/bigdecimal/jacobian.rb7
-rw-r--r--ext/bigdecimal/lib/bigdecimal/util.rb4
3 files changed, 6 insertions, 10 deletions
diff --git a/ext/bigdecimal/lib/bigdecimal.rb b/ext/bigdecimal/lib/bigdecimal.rb
index 96995a32b3..8fd2587c84 100644
--- a/ext/bigdecimal/lib/bigdecimal.rb
+++ b/ext/bigdecimal/lib/bigdecimal.rb
@@ -1,6 +1 @@
require 'bigdecimal.so'
-
-def BigDecimal.new(*args, **kwargs)
- warn "BigDecimal.new is deprecated; use BigDecimal() method instead.", uplevel: 1
- BigDecimal(*args, **kwargs)
-end
diff --git a/ext/bigdecimal/lib/bigdecimal/jacobian.rb b/ext/bigdecimal/lib/bigdecimal/jacobian.rb
index 84c50248b7..5e29304299 100644
--- a/ext/bigdecimal/lib/bigdecimal/jacobian.rb
+++ b/ext/bigdecimal/lib/bigdecimal/jacobian.rb
@@ -1,5 +1,7 @@
# frozen_string_literal: false
-#
+
+require 'bigdecimal'
+
# require 'bigdecimal/jacobian'
#
# Provides methods to compute the Jacobian matrix of a set of equations at a
@@ -21,9 +23,6 @@
#
# fx is f.values(x).
#
-
-require 'bigdecimal'
-
module Jacobian
module_function
diff --git a/ext/bigdecimal/lib/bigdecimal/util.rb b/ext/bigdecimal/lib/bigdecimal/util.rb
index 88f490cb45..4ece8347bd 100644
--- a/ext/bigdecimal/lib/bigdecimal/util.rb
+++ b/ext/bigdecimal/lib/bigdecimal/util.rb
@@ -6,7 +6,6 @@
#++
require 'bigdecimal'
-require 'bigdecimal/util.so'
class Integer < Numeric
# call-seq:
@@ -66,6 +65,9 @@ class String
#
# See also BigDecimal::new.
#
+ def to_d
+ BigDecimal.interpret_loosely(self)
+ end
end