lib/arrow/decimal256.rb in red-arrow-8.0.0 vs lib/arrow/decimal256.rb in red-arrow-9.0.0
- old
+ new
@@ -15,9 +15,23 @@
# specific language governing permissions and limitations
# under the License.
module Arrow
class Decimal256
+ class << self
+ # @api private
+ def try_convert(value)
+ case value
+ when String
+ new(value)
+ when Float
+ new(value.to_s)
+ else
+ nil
+ end
+ end
+ end
+
alias_method :to_s_raw, :to_s
# @overload to_s
#
# @return [String]