Bug 11222 – std.string.isNumeric accepts a "+"

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-10-10T14:06:00Z
Last change time
2013-10-12T06:57:16Z
Keywords
accepts-invalid, pull
Assigned to
andrej.mitrovich
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2013-10-10T14:06:51Z
With DMD 2.064 alpha this raises no assert error: import std.string: isNumeric; void main() { assert(isNumeric("+")); }
Comment #1 by andrej.mitrovich — 2013-10-11T06:56:43Z
Comment #2 by github-bugzilla — 2013-10-12T06:37:19Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/ac04f8bfd05ba271eb4e56c1ae80e33f7a502804 Fixes Issue 11222 - isNumeric should return false on -/+ as a single character. https://github.com/D-Programming-Language/phobos/commit/38b6c93c3356d5098c7baa1a10cdd34257d77306 Merge pull request #1627 from AndrejMitrovic/Fix11222 Issue 11222 - isNumeric should return false on -/+ as a single character