summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-20 21:12:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-20 21:12:58 +0000
commitd1a70bebcf8df159f71ca94e88dd8b50932a91d6 (patch)
tree43dd8946a2bfe3ee9b3a83c7c2eaf25651d072d0 /lib
parent7051193fb5d2a6ca23f641e2997b116886cea22e (diff)
* lib/scanf.rb (Scanf::FormatSpecifier#initialize): %i should accept
single digit decimal. [ruby-core:18355] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@18744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/scanf.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/scanf.rb b/lib/scanf.rb
index 2972bf9d60..a54485661d 100644
--- a/lib/scanf.rb
+++ b/lib/scanf.rb
@@ -357,7 +357,7 @@ module Scanf
# %i
when /%\*?i/
- [ "([-+]?(?:(?:0[0-7]+)|(?:0[Xx]#{h}+)|(?:[1-9]\\d+)))", :extract_integer ]
+ [ "([-+]?(?:(?:0[0-7]+)|(?:0[Xx]#{h}+)|(?:[1-9]\\d*)))", :extract_integer ]
# %5i
when /%\*?(\d+)i/