Specify explicit separator not to be affected by $;

This commit is contained in:
Nobuyoshi Nakada 2020-03-08 17:38:37 +09:00
parent 53efe63280
commit 2b7409a2f2
No known key found for this signature in database
GPG Key ID: 4BC7D6DF58D8DF60
10 changed files with 11 additions and 11 deletions

View File

@ -12,7 +12,7 @@ module Bundler
Bundler::SharedHelpers.major_deprecation 2, "bundle console will be replaced " \ Bundler::SharedHelpers.major_deprecation 2, "bundle console will be replaced " \
"by `bin/console` generated by `bundle gem <name>`" "by `bin/console` generated by `bundle gem <name>`"
group ? Bundler.require(:default, *group.split.map!(&:to_sym)) : Bundler.require group ? Bundler.require(:default, *group.split(' ').map!(&:to_sym)) : Bundler.require
ARGV.clear ARGV.clear
console = get_console(Bundler.settings[:console] || "irb") console = get_console(Bundler.settings[:console] || "irb")

View File

@ -2222,7 +2222,7 @@ RULES
message "creating Makefile\n" message "creating Makefile\n"
MakeMakefile.rm_f "#{CONFTEST}*" MakeMakefile.rm_f "#{CONFTEST}*"
if CONFIG["DLEXT"] == $OBJEXT if CONFIG["DLEXT"] == $OBJEXT
for lib in libs = $libs.split for lib in libs = $libs.split(' ')
lib.sub!(/-l(.*)/, %%"lib\\1.#{$LIBEXT}"%) lib.sub!(/-l(.*)/, %%"lib\\1.#{$LIBEXT}"%)
end end
$defs.push(format("-DEXTLIB='%s'", libs.join(","))) $defs.push(format("-DEXTLIB='%s'", libs.join(",")))

View File

@ -970,7 +970,7 @@ module Net
getok('UIDL') getok('UIDL')
table = {} table = {}
@socket.each_list_item do |line| @socket.each_list_item do |line|
num, uid = line.split num, uid = line.split(' ')
table[num.to_i] = uid table[num.to_i] = uid
end end
return table return table

View File

@ -1042,7 +1042,7 @@ module Net
return {} unless @string[3, 1] == '-' return {} unless @string[3, 1] == '-'
h = {} h = {}
@string.lines.drop(1).each do |line| @string.lines.drop(1).each do |line|
k, *v = line[4..-1].split k, *v = line[4..-1].split(' ')
h[k] = v h[k] = v
end end
h h

View File

@ -178,7 +178,7 @@ class RDoc::Markup::PreProcess
blankline blankline
when 'include' then when 'include' then
filename = param.split.first filename = param.split(' ', 2).first
include_file filename, prefix, encoding include_file filename, prefix, encoding
when 'main' then when 'main' then
@options.main_page = param if @options.respond_to? :main_page @options.main_page = param if @options.respond_to? :main_page

View File

@ -256,7 +256,7 @@ option)
result = [] result = []
patterns.split.each do |patt| patterns.split(' ').each do |patt|
candidates = Dir.glob(File.join(in_dir, patt)) candidates = Dir.glob(File.join(in_dir, patt))
result.concat normalized_file_list(candidates, false, @options.exclude) result.concat normalized_file_list(candidates, false, @options.exclude)
end end

View File

@ -356,7 +356,7 @@ or the PAGER environment variable.
end end
end end
argv = ENV['RI'].to_s.split.concat argv argv = ENV['RI'].to_s.split(' ').concat argv
opts.parse! argv opts.parse! argv
@ -1521,7 +1521,7 @@ or the PAGER environment variable.
pagers.compact.uniq.each do |pager| pagers.compact.uniq.each do |pager|
next unless pager next unless pager
pager_cmd = pager.split.first pager_cmd = pager.split(' ').first
next unless in_path? pager_cmd next unless in_path? pager_cmd

View File

@ -158,7 +158,7 @@ class RDoc::RubygemsHook
case config_args = Gem.configuration[:rdoc] case config_args = Gem.configuration[:rdoc]
when String then when String then
args = args.concat config_args.split args = args.concat config_args.split(' ')
when Array then when Array then
args = args.concat config_args args = args.concat config_args
end end

View File

@ -77,7 +77,7 @@ class Gem::Command
when Array when Array
@extra_args = value @extra_args = value
when String when String
@extra_args = value.split @extra_args = value.split(' ')
end end
end end

View File

@ -728,7 +728,7 @@ class VCS
commits = cmd_read([COMMAND, "log", "--reverse", "--format=%H %ae %ce", "#{com}..@"], "rb").split("\n") commits = cmd_read([COMMAND, "log", "--reverse", "--format=%H %ae %ce", "#{com}..@"], "rb").split("\n")
commits.each_with_index do |l, i| commits.each_with_index do |l, i|
r, a, c = l.split r, a, c = l.split(' ')
dcommit = [COMMAND, "svn", "dcommit"] dcommit = [COMMAND, "svn", "dcommit"]
dcommit.insert(-2, "-n") if dryrun dcommit.insert(-2, "-n") if dryrun
dcommit << "--add-author-from" unless a == c dcommit << "--add-author-from" unless a == c