Project

General

Profile

Feature #2152

Updated by ko1 (Koichi Sasada) about 12 years ago

=begin 
  
  Reposting here as a feature request. 
 
  As a side note, I think I figured out why the confusion occured in posting the original--if one navigates to "feature requests" then click "new issue" it defaults to a Bug report, even though you were browsing feature requests. 
 
  ============Proposal============= 
  Currently the Float#to_s and Float#inspect return an "accurate" representation of the internal float, to help alert users of floating point inconsistencies. 
 
  This is better than the old way.    Some have recently pointed out that the old functionality has been lost [the old "pretty float" style].    This is surprising to them. 
 
  In order to have 1.9.2 add functionality and not also lose the old, I propose to split the function of Float#inspect and Float#to_s thus: 
 
  String#to_s will be the pretty way 
  and 
  String#inspect will be the more accurate way. 
 
  With this in place, in irb users are notified of inaccuracies, and it is less surprising. 
 
  I'm not totally set on using those method names--the proposal is that both be available somewhere. 
 
  Thanks! 
  -r 
 
 =end 
 

Back