In my understanding, overriding Float#to_s (https://github.com/cjbissonnette/RubyScad/blob/master/lib/rubyscad/RubyScad.rb#L12) affects every code that require RubyScad gem, and may break some behaviors outside this gem. So it'll be better to get rid of overriding Float#to_s, and use other way like using normal value-formatting method, or using special inherited Float class.
I found this behavior when using CrystalScad(https://github.com/Joaz/CrystalScad), which is using this gem. It is strange that the result of "#{some_float_value}" changes if I require 'crystalscad'.
$ ruby -e "puts 3.0"
3.0
$ gem install crystalscad # if needed
$ ruby -rcrystalscad -e "puts 3.0"
3.000
In my understanding, overriding Float#to_s (https://github.com/cjbissonnette/RubyScad/blob/master/lib/rubyscad/RubyScad.rb#L12) affects every code that require RubyScad gem, and may break some behaviors outside this gem. So it'll be better to get rid of overriding Float#to_s, and use other way like using normal value-formatting method, or using special inherited Float class.
I found this behavior when using CrystalScad(https://github.com/Joaz/CrystalScad), which is using this gem. It is strange that the result of "#{some_float_value}" changes if I require 'crystalscad'.