Permalink
Browse files

Merge pull request #236 from steveklabnik/master

+ Improved documentation in rubygems.rb (steveklabnik)
  • Loading branch information...
2 parents b86954e + 7f54650 commit b46c0e0e34af630fd4c73ca213afe35cd4c0bfa1 @zenspider zenspider committed Dec 15, 2011
Showing with 31 additions and 26 deletions.
  1. +31 −26 lib/rubygems.rb
View
@@ -5,30 +5,6 @@
# See LICENSE.txt for permissions.
#++
-module Gem
- QUICKLOADER_SUCKAGE = RUBY_VERSION =~ /^1\.9\.1/
- GEM_PRELUDE_SUCKAGE = RUBY_VERSION =~ /^1\.9\.2/
-end
-
-if Gem::GEM_PRELUDE_SUCKAGE and defined?(Gem::QuickLoader) then
- Gem::QuickLoader.remove
-
- $LOADED_FEATURES.delete Gem::QuickLoader.path_to_full_rubygems_library
-
- if $LOADED_FEATURES.any? do |path| path.end_with? '/rubygems.rb' end then
- # TODO path does not exist here
- raise LoadError, "another rubygems is already loaded from #{path}"
- end
-
- class << Gem
- remove_method :try_activate if Gem.respond_to?(:try_activate, true)
- end
-end
-
-require 'rubygems/defaults'
-require 'rbconfig'
-require "rubygems/deprecate"
-
##
# RubyGems is the Ruby standard for publishing and managing third party
# libraries.
@@ -81,8 +57,8 @@ class << Gem
# == Bugs
#
# You can submit bugs to the
-# {RubyGems bug tracker}[http://rubyforge.org/tracker/?atid=575&group_id=126]
-# on RubyForge
+# {RubyGems bug tracker}[https://github.com/rubygems/rubygems/issues]
+# on GitHub
#
# == Credits
#
@@ -118,6 +94,35 @@ class << Gem
#
# -The RubyGems Team
+# Ruby 1.9.x has introduced some things that are awkward, and we need to
+# support them, so we define some constants to use later.
+module Gem
+ QUICKLOADER_SUCKAGE = RUBY_VERSION =~ /^1\.9\.1/
+ GEM_PRELUDE_SUCKAGE = RUBY_VERSION =~ /^1\.9\.2/
+end
+
+# Gem::QuickLoader exists in the gem prelude code in ruby 1.9.2 itself.
+# We gotta get rid of it if it's there, before we do anything else.
+if Gem::GEM_PRELUDE_SUCKAGE and defined?(Gem::QuickLoader) then
+ Gem::QuickLoader.remove
+
+ $LOADED_FEATURES.delete Gem::QuickLoader.path_to_full_rubygems_library
+
+ if $LOADED_FEATURES.any? do |path| path.end_with? '/rubygems.rb' end then
+ # TODO path does not exist here
+ raise LoadError, "another rubygems is already loaded from #{path}"
+ end
+
+ class << Gem
+ remove_method :try_activate if Gem.respond_to?(:try_activate, true)
+ end
+end
+
+require 'rubygems/defaults'
+require 'rbconfig'
+require "rubygems/deprecate"
+
+
module Gem
VERSION = '1.8.10'
DEFAULT_HOST = "https://rubygems.org"

0 comments on commit b46c0e0

Please sign in to comment.