1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/extmk.rb, lib/fileutils.rb, lib/mkmf.rb, lib/optparse.rb,

lib/shellwords.rb: get rid of shadowing outer local variable.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2006-10-09 14:41:24 +00:00
parent c009be97e8
commit 88d6c083ea
6 changed files with 45 additions and 43 deletions

View file

@ -28,7 +28,6 @@ module Shellwords
def shellwords(line)
words = []
field = ''
word = sq = dq = esc = garbage = sep = nil
line.scan(/\G\s*(?>([^\s\\\'\"]+)|'([^\']*)'|"((?:[^\"\\]|\\.)*)"|(\\.?)|(\S))(\s|\z)?/m) do
|word, sq, dq, esc, garbage, sep|
raise ArgumentError, "Unmatched double quote: #{line.inspect}" if garbage