blob: 1a044728dd6fc72eaf637dfcfc340f0ec6041772 [file] [edit]
begin
require "#{RUBY_VERSION[/\d+\.\d+/]}/bigdecimal.so"
rescue LoadError
require 'bigdecimal.so'
end
class BigDecimal
module Deprecation
def new(*args, **kwargs)
warn "BigDecimal.new is deprecated; use BigDecimal() method instead.", uplevel: 1
super
end
end
class << self
prepend Deprecation
def inherited(subclass)
warn "subclassing BigDecimal will be disallowed after bigdecimal version 2.0", uplevel: 1
end
end
end