Project

General

Profile

Bug #4337 ยป ruby-1.9-clean-chdir.patch

pyr (Pierre-Yves Ritschard), 01/29/2011 01:44 AM

View differences:

installer.rb (working copy)
def build_extensions
return if @spec.extensions.empty?
say "Building native extensions. This could take a while..."
start_dir = Dir.pwd
dest_path = File.join @gem_dir, @spec.require_paths.first
ran_rake = false # only run rake once
......
end
begin
Dir.chdir File.join(@gem_dir, File.dirname(extension))
results = builder.build(extension, @gem_dir, dest_path, results)
Dir.chdir File.join(@gem_dir, File.dirname(extension)) do
results = builder.build(extension, @gem_dir, dest_path, results)
say results.join("\n") if Gem.configuration.really_verbose
say results.join("\n") if Gem.configuration.really_verbose
end
rescue
results = results.join "\n"
......
EOF
raise ExtensionBuildError, message
ensure
Dir.chdir start_dir
end
end
end
    (1-1/1)