diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-10-08 10:45:52 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-10-08 10:45:52 +0000 |
commit | ec12edb11ca8667cacca36030b36150dab1d8173 (patch) | |
tree | 2762a500ab8307be8db14e0204926a3f7a311272 /lib/scanf.rb | |
parent | 8fb6f790fed6f8d6fa33a80d83e55d793c9eb516 (diff) | |
download | ruby-ec12edb11ca8667cacca36030b36150dab1d8173.tar.gz |
* lib/scanf.rb (Scanf::FormatSpecifier#letter, #width): use matched
substring directly.
* ext/nkf/lib/kconv.rb (Kconv.conv): get rid of nil.to_a.
* test/ruby/test_assignment.rb, test/ruby/test_iterator.rb: followed
change of sample/test.rb.
* test/net/http/test_http.rb: removed superfluous splatting stars.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/scanf.rb')
-rw-r--r-- | lib/scanf.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/scanf.rb b/lib/scanf.rb index e2f0d04c14..3d56e4aabd 100644 --- a/lib/scanf.rb +++ b/lib/scanf.rb @@ -467,11 +467,11 @@ module Scanf end def letter - /%\*?\d*([a-z\[])/.match(@spec_string).to_a[1] + @spec_string[/%\*?\d*([a-z\[])/, 1] end def width - w = /%\*?(\d+)/.match(@spec_string).to_a[1] + w = @spec_string[/%\*?(\d+)/, 1] w && w.to_i end |