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