Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save jmazzi/739476 to your computer and use it in GitHub Desktop.

Select an option

Save jmazzi/739476 to your computer and use it in GitHub Desktop.
diff -u -r ../jruby-1.5.1/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb
--- ../jruby-1.5.1/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb 2010-06-06 10:49:08.000000000 -0500
+++ lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb 2010-11-24 01:51:28.000000000 -0600
@@ -76,3 +76,19 @@
end
+plugins = Gem.find_files 'rubygems_plugin'
+
+plugins.each do |plugin|
+
+ # Skip older versions of the GemCutter plugin: Its commands are in
+ # RubyGems proper now.
+
+ next if plugin =~ /gemcutter-0\.[0-3]/
+
+ begin
+ load plugin
+ rescue => e
+ warn "error loading #{plugin.inspect}: #{e.message} (#{e.class})"
+ end
+end
+
diff -u -r ../jruby-1.5.1/lib/ruby/site_ruby/1.8/rubygems.rb lib/ruby/site_ruby/1.8/rubygems.rb
--- ../jruby-1.5.1/lib/ruby/site_ruby/1.8/rubygems.rb 2010-06-06 10:49:08.000000000 -0500
+++ lib/ruby/site_ruby/1.8/rubygems.rb 2010-11-24 01:51:10.000000000 -0600
@@ -1100,19 +1100,3 @@
Gem.clear_paths
-plugins = Gem.find_files 'rubygems_plugin'
-
-plugins.each do |plugin|
-
- # Skip older versions of the GemCutter plugin: Its commands are in
- # RubyGems proper now.
-
- next if plugin =~ /gemcutter-0\.[0-3]/
-
- begin
- load plugin
- rescue => e
- warn "error loading #{plugin.inspect}: #{e.message} (#{e.class})"
- end
-end
-
diff --git a/lib/ruby/site_ruby/1.8/rubygems.rb b/lib/ruby/site_ruby/1.8/rubygems.rb
index 665b785..95b2097 100644
--- a/lib/ruby/site_ruby/1.8/rubygems.rb
+++ b/lib/ruby/site_ruby/1.8/rubygems.rb
@@ -1135,6 +1135,3 @@ require 'rubygems/config_file'
require 'rubygems/custom_require' if gem_disabled or RUBY_VERSION < '1.9'
Gem.clear_paths
-
-Gem.load_plugins
-
diff --git a/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb b/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb
index 07a792d..48c9853 100644
--- a/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb
+++ b/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb
@@ -76,3 +76,4 @@ class Gem::GemRunner
end
+Gem.load_plugins
\ No newline at end of file
~/projects/jruby ➔ ls lib/ruby/gems/1.8/gems/ | wc -l
471
~/projects/jruby ➔ time jruby -rubygems -e 1
real 0m5.079s
user 0m7.375s
sys 0m0.393s
~/projects/jruby ➔ git stash pop --quiet
~/projects/jruby ➔ time jruby -rubygems -e 1
real 0m1.125s
user 0m1.401s
sys 0m0.139s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment