Skip to content

Commit ea1e143

Browse files
nobuaycabta
authored andcommitted
Specify explicit separator not to be affected by $;
1 parent a36033d commit ea1e143

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

lib/rdoc/markup/pre_process.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def handle_directive prefix, directive, param, code_object = nil,
178178

179179
blankline
180180
when 'include' then
181-
filename = param.split.first
181+
filename = param.split(' ', 2).first
182182
include_file filename, prefix, encoding
183183
when 'main' then
184184
@options.main_page = param if @options.respond_to? :main_page

lib/rdoc/rdoc.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def parse_dot_doc_file in_dir, filename
256256

257257
result = []
258258

259-
patterns.split.each do |patt|
259+
patterns.split(' ').each do |patt|
260260
candidates = Dir.glob(File.join(in_dir, patt))
261261
result.concat normalized_file_list(candidates, false, @options.exclude)
262262
end

lib/rdoc/ri/driver.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def self.process_args argv
356356
end
357357
end
358358

359-
argv = ENV['RI'].to_s.split.concat argv
359+
argv = ENV['RI'].to_s.split(' ').concat argv
360360

361361
opts.parse! argv
362362

@@ -1521,7 +1521,7 @@ def setup_pager
15211521
pagers.compact.uniq.each do |pager|
15221522
next unless pager
15231523

1524-
pager_cmd = pager.split.first
1524+
pager_cmd = pager.split(' ').first
15251525

15261526
next unless in_path? pager_cmd
15271527

lib/rdoc/rubygems_hook.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def generate
158158

159159
case config_args = Gem.configuration[:rdoc]
160160
when String then
161-
args = args.concat config_args.split
161+
args = args.concat config_args.split(' ')
162162
when Array then
163163
args = args.concat config_args
164164
end

0 commit comments

Comments
 (0)