rubygem-rspec-support/rubygem-rspec-support-3.6.0.beta2-fix-for-ruby-2.4.0.patch
2017-02-06 15:29:41 +09:00

18 lines
636 B
Diff

diff --git a/lib/rspec/support/object_formatter.rb b/lib/rspec/support/object_formatter.rb
index 6f74061..6c83209 100644
--- a/lib/rspec/support/object_formatter.rb
+++ b/lib/rspec/support/object_formatter.rb
@@ -243,7 +243,12 @@ module RSpec
DescribableMatcherInspector,
DelegatorInspector,
InspectableObjectInspector
- ]
+ ].tap do |classes|
+ # 2.4 has improved BigDecimal formatting so we do not need
+ # to provide our own.
+ # https://github.com/ruby/bigdecimal/pull/42
+ classes.delete(BigDecimalInspector) if RUBY_VERSION >= '2.4'
+ end
end
end
end