Skip to content

Commit 3b262a7

Browse files
committed
String#to_a is gone as of Ruby 1.9.1
1 parent 5376064 commit 3b262a7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/git/lib.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ def checkout_file(version, file)
453453
def merge(branch, message = nil)
454454
arr_opts = []
455455
arr_opts << ["-m '#{message}'"] if message
456-
arr_opts << branch.to_a.join(' ')
456+
arr_opts << [branch].join(' ')
457457
command('merge', arr_opts)
458458
end
459459

@@ -534,7 +534,7 @@ def gc
534534
def read_tree(treeish, opts = {})
535535
arr_opts = []
536536
arr_opts << "--prefix=#{opts[:prefix]}" if opts[:prefix]
537-
arr_opts << treeish.to_a.join(' ')
537+
arr_opts << [treeish].join(' ')
538538
command('read-tree', arr_opts)
539539
end
540540

@@ -610,7 +610,7 @@ def command(cmd, opts = [], chdir = true, &block)
610610
ENV['GIT_WORK_TREE'] = @git_work_dir
611611
path = @git_work_dir || @git_dir || @path
612612

613-
opts = opts.to_a.join(' ')
613+
opts = [opts].join(' ')
614614
git_cmd = "git #{cmd} #{opts} 2>&1"
615615

616616
out = nil

0 commit comments

Comments
 (0)