Actions
Bug #13833
closedString#scanf("%a") incorrectly requires a sign on the (binary) exponent
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
Description
>> Float("0x1p9")
=> 512.0
>> Float("0x1p+9")
=> 512.0
>> "0x1p+9".scanf("%a")
=> [512.0]
>> "0x1p9".scanf("%a")
=> [0.0] # Oops
>> RUBY_VERSION
=> "2.4.1"
In scanf.rb, there are three regexps that say the equivalent of [pP][+-] where they should say [pP][+-]?
Actions
Like0
Like0Like0