Actually it decides on the runtime whether `BigDecimal` will allow dup or not, depending on the ruby version. 
Before ruby version 2.0.0, `BigDecimal` used to raise `TypeError` exception, but in 2.0.0, `BigDecimal` started allowing dup on itself. 

We can remove this by checking the ruby version. This will need a change [here](https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/object/duplicable.rb#L82) also.