Project

General

Profile

This project is closed and read-only.

Actions

Backport #3964

closed

Wrong length of sprintf("%020a",1)

Backport #3964: Wrong length of sprintf("%020a",1)

Added by phasis68 (Heesob Park) almost 16 years ago. Updated over 15 years ago.

Status:
Closed
[ruby-core:32848]

Description

=begin
The Revision r29531 introduced a new bug.

sprintf("%020a",1)
=> "0x0000000000001p+0"
sprintf("%20a",1)
=> " 0x1p+0"
sprintf("%020a",-1)
=> "-0x00000000000001p+0"
sprintf("%20a",-1)
=> " -0x1p+0"
sprintf("%20a",1).length
=> 18
sprintf("%020a",1).length
=> 18
sprintf("%020a",-1).length
=> 20
sprintf("%20a",-1).length
=> 20
=end


Related issues 1 (0 open1 closed)

Related to Backport192 - Backport #3962: Wrong value of sprintf("%020a",1)Closedyugui (Yuki Sonoda)Actions
Actions

Also available in: PDF Atom