From cc94722ddf392bf486b73cf847a7bc2e5e87550a Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 8 Oct 2005 10:45:52 +0000 Subject: * 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 --- lib/scanf.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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 -- cgit