Project

General

Profile

Actions

Bug #14731

closed

Float() ignores exponent in long string

Added by nobu (Nobuyoshi Nakada) almost 6 years ago. Updated about 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:86836]

Description

Related to #14729:

Float("1."+"00000"*Float::DIG+"0e10") #=> 10000000000.0
Float("1."+"00000"*Float::DIG+"_0e10") #=> 1.0

Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #14729: Float("long_invalid_string") fails to throw an exceptionClosedActions
Actions #1

Updated by nobu (Nobuyoshi Nakada) almost 6 years ago

  • Related to Bug #14729: Float("long_invalid_string") fails to throw an exception added
Actions #2

Updated by nobu (Nobuyoshi Nakada) almost 6 years ago

  • Status changed from Open to Closed

Applied in changeset trunk|r63322.


object.c: fix exponent with underscore

  • object.c (rb_cstr_to_dbl_raise): do not ignore exponent part
    when the input string longer than internal buffer contains
    underscore(s). [ruby-core:86836] [Bug #14731]

Updated by nagachika (Tomoyuki Chikanaga) about 5 years ago

  • Backport changed from 2.3: REQUIRED, 2.4: REQUIRED, 2.5: REQUIRED to 2.3: REQUIRED, 2.4: REQUIRED, 2.5: DONE

ruby_2_5 r66879 merged revision(s) 63322.

Actions #4

Updated by usa (Usaku NAKAMURA) about 5 years ago

  • Backport changed from 2.3: REQUIRED, 2.4: REQUIRED, 2.5: DONE to 2.3: REQUIRED, 2.4: DONE, 2.5: DONE
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0