rails/rails — pull request #6512 by jaredbeck (2012-05-28 07:13:31+00:00)
Title: Fix handling of negative zero in number_to_currency

Without this patch, `number_to_currency()` treats `-0.0` as if it were a positive number and fails to apply the `:negative_format` option.

I tried to write this to support multiple rubies. In modern rubies, it will invoke `phase()` but looking at the docs for older rubies I couldn't find a satisfactory alternative, and had to settle for slicing the first char off of `to_s()`. Please tell me there's a better way. :-)