Ruby 2.4 .round method breaking change (ROLLED BACK!)

round
float

#1

If we make it Ruby 2.4 in SketchUp it appears the Ruby devs are changing the default behavior of the #round method.

# Ruby 2.3
2.5.round
3

# Ruby 2.4
2.5.round
2

Am I incorrect in thinking this could have a significant impact on SketchUp Extensions? Or maybe just something to keep in mind?

https://bugs.ruby-lang.org/issues/12958


#2

Whew! That was a close one. Common sense has prevailed.

Matz himself weighed in, and agreed about a hour ago, that round()’s default behavior needed to be rolled back to :half :up

It has been done (already) and applied in changset r57038.

Issue Closed


It was very interesting to read that issue thread, how one of the core team was so obstinate to force the Float using world to conform to sprintf(), a mere display formatting method. Crazy.