Skip to content

Commit

Permalink
BigDecimal fixes for Ruby-head I hope
Browse files Browse the repository at this point in the history
  • Loading branch information
nomoon committed Mar 5, 2017
1 parent ad97e33 commit dfbe050
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 5 additions & 1 deletion lib/ragabash/refinements.rb
Expand Up @@ -179,9 +179,13 @@ def present?
end
end

# Necessary to re-override Numeric
require "bigdecimal"
refine ::BigDecimal do
def dup
dup = self.class.allocate
initialize_copy(dup)
dup
end
alias try_dup dup
alias deep_dup dup

Expand Down
7 changes: 4 additions & 3 deletions spec/spec_helper.rb
@@ -1,11 +1,12 @@
# frozen_string_literal: true
require "simplecov"
require "coveralls"
# Coveralls.wear!
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[

formatters = [
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
Coveralls::SimpleCov::Formatter,
]
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(formatters)
SimpleCov.start

RSpec::Matchers.define_negated_matcher :not_be, :be
Expand Down

0 comments on commit dfbe050

Please sign in to comment.