summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-03-08 17:38:37 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-03-08 17:38:37 +0900
commit2b7409a2f2aaab1368c57e1cd03c12b2b8972fa9 (patch)
tree1d3d2d2c5c91cd732fc093f0245acf6d67bf718c
parent53efe6328057ccb604a81541080aab3b3e1268d7 (diff)
Specify explicit separator not to be affected by $;
-rw-r--r--lib/bundler/cli/console.rb2
-rw-r--r--lib/mkmf.rb2
-rw-r--r--lib/net/pop.rb2
-rw-r--r--lib/net/smtp.rb2
-rw-r--r--lib/rdoc/markup/pre_process.rb2
-rw-r--r--lib/rdoc/rdoc.rb2
-rw-r--r--lib/rdoc/ri/driver.rb4
-rw-r--r--lib/rdoc/rubygems_hook.rb2
-rw-r--r--lib/rubygems/command.rb2
-rw-r--r--tool/lib/vcs.rb2
10 files changed, 11 insertions, 11 deletions
diff --git a/lib/bundler/cli/console.rb b/lib/bundler/cli/console.rb
index 6e0dfe28af..c3198331a9 100644
--- a/lib/bundler/cli/console.rb
+++ b/lib/bundler/cli/console.rb
@@ -12,7 +12,7 @@ module Bundler
Bundler::SharedHelpers.major_deprecation 2, "bundle console will be replaced " \
"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
console = get_console(Bundler.settings[:console] || "irb")
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index eabccd48eb..f23f34c312 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -2222,7 +2222,7 @@ RULES
message "creating Makefile\n"
MakeMakefile.rm_f "#{CONFTEST}*"
if CONFIG["DLEXT"] == $OBJEXT
- for lib in libs = $libs.split
+ for lib in libs = $libs.split(' ')
lib.sub!(/-l(.*)/, %%"lib\\1.#{$LIBEXT}"%)
end
$defs.push(format("-DEXTLIB='%s'", libs.join(",")))
diff --git a/lib/net/pop.rb b/lib/net/pop.rb
index 8712345301..30161105f9 100644
--- a/lib/net/pop.rb
+++ b/lib/net/pop.rb
@@ -970,7 +970,7 @@ module Net
getok('UIDL')
table = {}
@socket.each_list_item do |line|
- num, uid = line.split
+ num, uid = line.split(' ')
table[num.to_i] = uid
end
return table
diff --git a/lib/net/smtp.rb b/lib/net/smtp.rb
index da8c3f26b1..801f662d01 100644
--- a/lib/net/smtp.rb
+++ b/lib/net/smtp.rb
@@ -1042,7 +1042,7 @@ module Net
return {} unless @string[3, 1] == '-'
h = {}
@string.lines.drop(1).each do |line|
- k, *v = line[4..-1].split
+ k, *v = line[4..-1].split(' ')
h[k] = v
end
h
diff --git a/lib/rdoc/markup/pre_process.rb b/lib/rdoc/markup/pre_process.rb
index d9e0dcac14..3080ae3578 100644
--- a/lib/rdoc/markup/pre_process.rb
+++ b/lib/rdoc/markup/pre_process.rb
@@ -178,7 +178,7 @@ class RDoc::Markup::PreProcess
blankline
when 'include' then
- filename = param.split.first
+ filename = param.split(' ', 2).first
include_file filename, prefix, encoding
when 'main' then
@options.main_page = param if @options.respond_to? :main_page
diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb
index c60e017609..1c099b2ce6 100644
--- a/lib/rdoc/rdoc.rb
+++ b/lib/rdoc/rdoc.rb
@@ -256,7 +256,7 @@ option)
result = []
- patterns.split.each do |patt|
+ patterns.split(' ').each do |patt|
candidates = Dir.glob(File.join(in_dir, patt))
result.concat normalized_file_list(candidates, false, @options.exclude)
end
diff --git a/lib/rdoc/ri/driver.rb b/lib/rdoc/ri/driver.rb
index 46b98e99b5..1f504a6ac7 100644
--- a/lib/rdoc/ri/driver.rb
+++ b/lib/rdoc/ri/driver.rb
@@ -356,7 +356,7 @@ or the PAGER environment variable.
end
end
- argv = ENV['RI'].to_s.split.concat argv
+ argv = ENV['RI'].to_s.split(' ').concat argv
opts.parse! argv
@@ -1521,7 +1521,7 @@ or the PAGER environment variable.
pagers.compact.uniq.each do |pager|
next unless pager
- pager_cmd = pager.split.first
+ pager_cmd = pager.split(' ').first
next unless in_path? pager_cmd
diff --git a/lib/rdoc/rubygems_hook.rb b/lib/rdoc/rubygems_hook.rb
index 90b0541fcf..a676455ec7 100644
--- a/lib/rdoc/rubygems_hook.rb
+++ b/lib/rdoc/rubygems_hook.rb
@@ -158,7 +158,7 @@ class RDoc::RubygemsHook
case config_args = Gem.configuration[:rdoc]
when String then
- args = args.concat config_args.split
+ args = args.concat config_args.split(' ')
when Array then
args = args.concat config_args
end
diff --git a/lib/rubygems/command.rb b/lib/rubygems/command.rb
index d9a0700b95..11b6645e9d 100644
--- a/lib/rubygems/command.rb
+++ b/lib/rubygems/command.rb
@@ -77,7 +77,7 @@ class Gem::Command
when Array
@extra_args = value
when String
- @extra_args = value.split
+ @extra_args = value.split(' ')
end
end
diff --git a/tool/lib/vcs.rb b/tool/lib/vcs.rb
index 63a1b70dca..c4d894e107 100644
--- a/tool/lib/vcs.rb
+++ b/tool/lib/vcs.rb
@@ -728,7 +728,7 @@ class VCS
commits = cmd_read([COMMAND, "log", "--reverse", "--format=%H %ae %ce", "#{com}..@"], "rb").split("\n")
commits.each_with_index do |l, i|
- r, a, c = l.split
+ r, a, c = l.split(' ')
dcommit = [COMMAND, "svn", "dcommit"]
dcommit.insert(-2, "-n") if dryrun
dcommit << "--add-author-from" unless a == c