diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-28 00:56:35 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-28 00:56:35 +0000 |
commit | 63dd50961e08172bb88358d95d50efee4c6eead0 (patch) | |
tree | 7aa314bf6392150a28f8b8590f0c170dac0c8679 /lib/scanf.rb | |
parent | c08277c62d4d372288eb0b8f222758542d9168b6 (diff) | |
download | ruby-63dd50961e08172bb88358d95d50efee4c6eead0.tar.gz |
* lib/scanf.rb: fix %[egEFG] isn't accept.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/scanf.rb')
-rw-r--r-- | lib/scanf.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/scanf.rb b/lib/scanf.rb index 386270b924..ed39a48292 100644 --- a/lib/scanf.rb +++ b/lib/scanf.rb @@ -409,11 +409,11 @@ module Scanf [ "([-+][0-7]{1,#{$1.to_i-1}}|[0-7]{1,#{$1}})", :extract_octal ] # %f - when /%\*?f/ + when /%\*?[efgEFG]/ [ '([-+]?((\d+(?>(?=[^\d.]|$)))|(\d*(\.(\d*([eE][-+]?\d+)?)))))', :extract_float ] # %5f - when /%\*?(\d+)f/ + when /%\*?(\d+)[efgEFG]/ [ "(\\S{1,#{$1}})", :extract_float ] # %5s @@ -490,7 +490,7 @@ module Scanf attr_reader :string_left, :last_spec_tried, :last_match_tried, :matched_count, :space - SPECIFIERS = 'diuXxofeEgsc' + SPECIFIERS = 'diuXxofFeEgGsc' REGEX = / # possible space, followed by... (?:\s* |