[ruby-cvs:65145] nobu:r57979 (trunk): object.c: make String#to_f consistent with literal

nobu at ruby-lang.org nobu at ruby-lang.org
Wed Mar 15 17:15:33 JST 2017


nobu	2017-03-15 17:15:32 +0900 (Wed, 15 Mar 2017)

  New Revision: 57979

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57979

  Log:
    object.c: make String#to_f consistent with literal
    
    * object.c (rb_cstr_to_dbl): stop at successive underscores, as
      well as Float literals.  [ruby-core:80098] [Bug #13105]
    
      * `_` should be within digits
      * only one `_` allowed between digits

  Modified files:
    trunk/object.c
    trunk/test/ruby/test_float.rb


More information about the ruby-cvs mailing list