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 | cc94722ddf392bf486b73cf847a7bc2e5e87550a (patch) | |
| tree | 2762a500ab8307be8db14e0204926a3f7a311272 /lib | |
| parent | bb88d4c2f57f44e6c39f54f7beb13eaf4ffd9405 (diff) | |
| download | ruby-cc94722ddf392bf486b73cf847a7bc2e5e87550a.tar.gz ruby-cc94722ddf392bf486b73cf847a7bc2e5e87550a.tar.xz ruby-cc94722ddf392bf486b73cf847a7bc2e5e87550a.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@9360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
| -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 e2f0d04c1..3d56e4aab 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 |
