lib/faster_rubygems.rb in faster_rubygems-0.2.1 vs lib/faster_rubygems.rb in faster_rubygems-0.5.1
- old
+ new
@@ -1,33 +1,8 @@
-if RUBY_VERSION < '1.9'
- require File.dirname(__FILE__) + '/faster_rubygems_lib.rb'
- all = FasterRubyGems.gem_prelude_paths
- all.each{|path|
- $: << path
- }
-
- module Kernel
-
- def gem *args
- undef :gem
- require 'rubygems' # punt!
- gem *args
- end
-
- end
-
- module ::Gem
- def self.const_missing const
- require 'rubygems' # punt!
- return Gem.const_get(const)
- end
-
- def self.method_missing meth, *args
- require 'rubygems' # punt!
- return Gem.send(meth, *args)
- end
- end
-
-
-else
- # not needed in 1.9, which by default loads gem_prelude
+if RUBY_VERSION < '1.9.0'
+ raise 'rubygems was already loaded' if defined?(Gem)
+ module Gem; end # define it so gem_prelude will execute...
+ require File.dirname(__FILE__) + "/my_gem_prelude.rb"
end
+
+# both 1.8 and 1.9 now want this one though...
+require File.dirname(__FILE__) + "/prelude_bin_path"