summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordblack <dblack@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-03 12:54:13 +0000
committerdblack <dblack@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-03 12:54:13 +0000
commita4007353f3479d7b56382b89fac288319b9b3eb2 (patch)
tree36e2d3c91003a075b2b65a6240d6efa09f482394 /lib
parent3009b4616f05949e202674371b3eb80b084f08f7 (diff)
downloadruby-a4007353f3479d7b56382b89fac288319b9b3eb2.tar.gz
ruby-a4007353f3479d7b56382b89fac288319b9b3eb2.tar.xz
ruby-a4007353f3479d7b56382b89fac288319b9b3eb2.zip
* lib/scanf.rb: fixed bug involving matching literal '['
* test/scanf/test_scanf.rb: added test for scanf.rb fix git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19094 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 564ce11fe..cbb98b6f9 100644
--- a/lib/scanf.rb
+++ b/lib/scanf.rb
@@ -325,7 +325,7 @@ module Scanf
end
def count_space?
- /(?:\A|\S)%\*?\d*c|\[/.match(@spec_string)
+ /(?:\A|\S)%\*?\d*c|%\d*\[/.match(@spec_string)
end
def initialize(str)