summaryrefslogtreecommitdiff
path: root/lib/rdoc
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 /lib/rdoc
parent53efe6328057ccb604a81541080aab3b3e1268d7 (diff)
Specify explicit separator not to be affected by $;
Diffstat (limited to 'lib/rdoc')
-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
4 files changed, 5 insertions, 5 deletions
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