summaryrefslogtreecommitdiffstats
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
commitd17d1b111341f2c8979cf8fbd63ec7ec9db7c3ad (patch)
tree5e35d5b41aae961b37cf6632f60c42f51c7aa775 /lib/scanf.rb
parent101e79d7b434c01c0e6f4bcc480003858ab8e1a4 (diff)
downloadruby-d17d1b111341f2c8979cf8fbd63ec7ec9db7c3ad.tar.gz
ruby-d17d1b111341f2c8979cf8fbd63ec7ec9db7c3ad.tar.xz
ruby-d17d1b111341f2c8979cf8fbd63ec7ec9db7c3ad.zip
* {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: http://svn.ruby-lang.org/repos/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 cbb98b6f9..386270b92 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)