Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

rework exception management for JRuby compatibility #355

Merged
merged 1 commit into from

3 participants

@alexch

Once more into the breach! This patch should work with JRuby. Unfortunately I can't get "rvm jruby do rake test" to run since RubyKernel.java seems to be preferring its own version of rubygems but I tested the code itself in "rvm jruby irb".

"rake test" passes under MRI 1.9.3 and 1.8.7. Any other Ruby versions I need to worry about?

@travisbot

This pull request passes (merged 6f87401 into 0d36b2f).

@zenspider zenspider merged commit f9c85f8 into rubygems:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 8, 2012
  1. @alexch
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 6 deletions.
  1. +9 −6 lib/rubygems/dependency_installer.rb
View
15 lib/rubygems/dependency_installer.rb
@@ -387,14 +387,17 @@ def install dep_or_name, version = Gem::Requirement.default
end
def in_background what
+ fork_happened = false
if @build_docs_in_background and Process.respond_to?(:fork)
- say "#{what} in a background process."
- Process.fork do
- yield
+ begin
+ Process.fork do
+ yield
+ end
+ fork_happened = true
+ say "#{what} in a background process."
+ rescue NotImplementedError
end
- else
- yield
end
+ yield unless fork_happened
end
-
end
Something went wrong with that request. Please try again.