I have pushed your most recent patch in 4d0f765, and thought I'd post an updated list of failures here. Thanks for the additional fixes! We're down to 11 failures, 10 errors.
I've removed the backtraces; clone rubygems and run rake test yourself to get more information. Comments follow each section.
"/private/var/folders/V5/V5W2zlDQHPy94tAnCC5f6U+++TI/-Tmp-/test_rubygems_18593/gemhome"], not ["/private/var/folders/V5/V5W2zlDQHPy94tAnCC5f6U+++TI/-Tmp-/test_rubygems_18593/gemhome"].
The first 8 failures all look like this first one. Some oddity with temp directories?
Errno::ENOENT: No such file or directory - No such file or directory - gem-private_key.pem
I'm not sure about this one. OpenSSL issue?
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
We will probably need to submit a patch to rubygems to not run the native ext tests under JRuby. Failure 15 is the same thing.
Gem::RemoteFetcher::FetchError: no data for http://gems.example.com/gems/a-1.gem (http://gems.example.com/gems/a-1.gem)
Failures 11-14 look like this. Is it actually trying to fetch from example.com? Or are we supposed to have a dummy host set up or something?
Expected /\Aextconf failed:
checking for main\(\) in .*?nonexistent/m to match "extconf failed:\n\n/Users/headius/projects/jruby/bin/jruby extconf.rb\nWARNING: JRuby does not support native extensions or the `mkmf' library.\n Check http://kenai.com/projects/jruby/pages/Home for alternatives.\nextconf.rb:2: undefined method `have_library' for main:Object/Users/headius/projects/rubygems/test/gemutilities.rb:7 warning: SAFE levels are not supported in JRuby
This one is apparently testing that it can't build a native extension in SAFE mode. We support neither, so another test patch is probably necessary.
Expected /\/Users\/headius\/projects\/jruby\/bin\/jruby: No such file/ to match "/Users/headius/projects/jruby/bin/jruby extconf.rb
--build_arg1 --build_arg2\nError opening script file: /private/var/folders/V5/V5W2zlDQHPy94tAnCC5f6U+++TI/-Tmp-/test_rubygems_18593/gemhome/gems/a-2/extconf.rb (No such file or directory)\n".
Looks like another oddity with temp directories?
IOError: Permission denied
I'm not sure what that one's all about.
Gem::RemoteFetcher::FetchError: SystemCallError: Unknown error - Connection reset by peer (http://localhost:8980/yaml)
Looks like it may be setting up a local server and trying to connect to it? Perhaps it's not up and running when the test actually tries to connect?
Expected /syntax error/ to match "WARNING: /private/var/folders/V5/V5W2zlDQHPy94tAnCC5f6U+++TI/-Tmp-/test_rubygems_18593/gemhome/specifications/a-1.gemspec:1: , unexpected end-of-file\n\n1 +\n ^\nWARNING: 1 +\n".
Some difference in errors?