summaryrefslogtreecommitdiff
path: root/lib/scanf.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-06 03:56:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-06 03:56:38 +0000
commit287a34ae0dfc23e4158f67cb7783d239f202c368 (patch)
tree5e35d5b41aae961b37cf6632f60c42f51c7aa775 /lib/scanf.rb
parent9b52ae2e6491bb5d6c59e1799449f6268baf6f89 (diff)
* {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/scanf.rb')
-rw-r--r--lib/scanf.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/scanf.rb b/lib/scanf.rb
index cbb98b6f9f..386270b924 100644
--- a/lib/scanf.rb
+++ b/lib/scanf.rb
@@ -63,7 +63,7 @@ to the beginning of the format string, and yields a new array of
conversions to the block every time the format string is matched
(including partial matches, but not including complete failures). The
actual return value of scanf when called with a block is an array
-containing the results of all the executions of the block.
+containing the results of all the executions of the block.
str = "123 abc 456 def 789 ghi"
str.scanf("%d%s") { |num,str| [ num * 2, str.upcase ] }
@@ -100,7 +100,7 @@ and <tt>tests/scanftests.rb</tt> for examples.)
[u]
Same as d.
-[i]
+[i]
Matches an optionally signed integer. The integer is read in base
16 if it begins with `0x' or `0X', in base 8 if it begins with `0',
and in base 10 other- wise. Only characters that correspond to the
@@ -280,7 +280,7 @@ Project contributors:: Nolan Darilek, Jason Johnston
Thanks to Hal Fulton for hosting the Codefest.
-Thanks to Matz for suggestions about the class design.
+Thanks to Matz for suggestions about the class design.
Thanks to Gavin Sinclair for some feedback on the documentation.
@@ -332,7 +332,7 @@ module Scanf
@spec_string = str
h = '[A-Fa-f0-9]'
- @re_string, @handler =
+ @re_string, @handler =
case @spec_string
# %[[:...:]]
@@ -482,7 +482,7 @@ module Scanf
return width_left || cc_no_width
end
-
+
end
class FormatString
@@ -672,10 +672,10 @@ class String
if b
block_scanf(fstr,&b)
else
- fs =
+ fs =
if fstr.is_a? Scanf::FormatString
- fstr
- else
+ fstr
+ else
Scanf::FormatString.new(fstr)
end
fs.match(self)