How to duplicate a floating point number in Ruby Sketchup?

If you wish further proof …

Numeric#dup

Returns the receiver.

So new for very recent Ruby versions (it is in Ruby 2.5.1+ used by SketchUp 2019+,) the Ruby Core overrode Object#dup and Object#clone for all numeric subclasses, so that code could happily use the same code for immediate and non-immediate classes. (“happily” means the suppression of the error.)