~ubuntu-branches/ubuntu/quantal/ruby1.9.1/quantal

« back to all changes in this revision

Viewing changes to lib/rubygems/ext/rake_builder.rb

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2011-09-24 19:16:17 UTC
  • mfrom: (1.1.8 upstream) (13.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20110924191617-o1qz4rcmqjot8zuy
Tags: 1.9.3~rc1-1
* New upstream release: 1.9.3 RC1.
  + Includes load.c fixes. Closes: #639959.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
    end
18
18
 
19
19
    # Deal with possible spaces in the path, e.g. C:/Program Files
20
 
    dest_path = '"' + dest_path + '"' if dest_path.include?(' ')
21
 
 
22
 
    cmd = ENV['rake'] || "#{Gem.ruby} -rubygems #{Gem.bin_path('rake')}" rescue Gem.default_exec_format % 'rake'
23
 
    cmd += " RUBYARCHDIR=#{dest_path} RUBYLIBDIR=#{dest_path}" # ENV is frozen
 
20
    dest_path = '"' + dest_path.to_s + '"' if dest_path.to_s.include?(' ')
 
21
 
 
22
    rake = ENV['rake']
 
23
 
 
24
    rake ||= begin
 
25
               "\"#{Gem.ruby}\" -rubygems #{Gem.bin_path('rake', 'rake')}"
 
26
             rescue Gem::Exception
 
27
             end
 
28
 
 
29
    rake ||= Gem.default_exec_format % 'rake'
 
30
 
 
31
    cmd = "#{rake} RUBYARCHDIR=#{dest_path} RUBYLIBDIR=#{dest_path}" # ENV is frozen
24
32
 
25
33
    run cmd, results
26
34