Issue #1566 has been updated by m ..

File fix-nan-and-inf-in-sprintf.diff added

The attached patch fixes this by removing the Windows-only ifdef that currently guards the portion of the code doing the formatting of the resulting string. 

I'm not sure of why it was guarded in the first place (the code works fine in OS X) so please test this on Linux/other platforms and apply if you consider this change is worth making.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/1566

----------------------------------------
http://redmine.ruby-lang.org