Skip to content

Commit

Permalink
Updated bundled rubygems to 1.8.25.
Browse files Browse the repository at this point in the history
  • Loading branch information
brixen committed Feb 20, 2013
1 parent 5f869bb commit 64949fc
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/rubygems.rb
Expand Up @@ -121,7 +121,7 @@ class << Gem
# -The RubyGems Team

module Gem
VERSION = '1.8.24'
VERSION = '1.8.25'

##
# Raised when RubyGems is unable to load or activate a gem. Contains the
Expand Down
2 changes: 1 addition & 1 deletion lib/rubygems/commands/setup_command.rb
Expand Up @@ -165,7 +165,7 @@ def install_executables(bin_dir)
end

dest_file = File.join bin_dir, bin_file_formatted
bin_tmp_file = File.join Dir.tmpdir, bin_file
bin_tmp_file = File.join Dir.tmpdir, "#{bin_file}.#{$$}"

begin
bin = File.readlines bin_file
Expand Down
3 changes: 3 additions & 0 deletions lib/rubygems/indexer.rb
Expand Up @@ -584,6 +584,9 @@ def update_index
specs = map_gems_to_specs updated_gems
prerelease, released = specs.partition { |s| s.version.prerelease? }

Gem::Specification.dirs = []
Gem::Specification.add_specs(*specs)

files = build_marshal_gemspecs

Gem.time 'Updated indexes' do
Expand Down
8 changes: 7 additions & 1 deletion lib/rubygems/installer.rb
Expand Up @@ -435,7 +435,13 @@ def process_options
def check_that_user_bin_dir_is_in_path
user_bin_dir = @bin_dir || Gem.bindir(gem_home)
user_bin_dir.gsub!(File::SEPARATOR, File::ALT_SEPARATOR) if File::ALT_SEPARATOR
unless ENV['PATH'].split(File::PATH_SEPARATOR).include? user_bin_dir then
path = ENV['PATH']
if Gem.win_platform? then
path = path.downcase
user_bin_dir = user_bin_dir.downcase
end

unless path.split(File::PATH_SEPARATOR).include? user_bin_dir then
unless self.class.path_warning then
alert_warning "You don't have #{user_bin_dir} in your PATH,\n\t gem executables will not run."
self.class.path_warning = true
Expand Down
1 change: 0 additions & 1 deletion lib/rubygems/package/tar_input.rb
Expand Up @@ -5,7 +5,6 @@
#--

require 'zlib'
Gem.load_yaml

class Gem::Package::TarInput

Expand Down
1 change: 1 addition & 0 deletions lib/rubygems/requirement.rb
Expand Up @@ -135,6 +135,7 @@ def yaml_initialize(tag, vals) # :nodoc:
instance_variable_set "@#{ivar}", val
end

Gem.load_yaml
fix_syck_default_key_in_requirements
end

Expand Down
6 changes: 5 additions & 1 deletion lib/rubygems/specification.rb
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
Expand Down Expand Up @@ -1720,7 +1721,9 @@ def ruby_code(obj)
when Numeric then obj.inspect
when true, false, nil then obj.inspect
when Gem::Platform then "Gem::Platform.new(#{obj.to_a.inspect})"
when Gem::Requirement then "Gem::Requirement.new(#{obj.to_s.inspect})"
when Gem::Requirement then
list = obj.as_list
"Gem::Requirement.new(#{ruby_code(list.size == 1 ? obj.to_s : list)})"
else raise Gem::Exception, "ruby_code case not handled: #{obj.class}"
end
end
Expand Down Expand Up @@ -1946,6 +1949,7 @@ def to_yaml(opts = {}) # :nodoc:
ast = builder.tree

io = StringIO.new
io.set_encoding Encoding::UTF_8 if Object.const_defined? :Encoding

Psych::Visitors::Emitter.new(io).accept(ast)

Expand Down
5 changes: 5 additions & 0 deletions lib/rubygems/test_case.rb
Expand Up @@ -417,6 +417,11 @@ def util_build_gem(spec)
end
end

def util_remove_gem(spec)
FileUtils.rm_rf spec.cache_file
FileUtils.rm_rf spec.spec_file
end

##
# Removes all installed gems from +@gemhome+.

Expand Down
2 changes: 1 addition & 1 deletion lib/rubygems/version.rb
Expand Up @@ -187,7 +187,7 @@ def initialize version
raise ArgumentError, "Malformed version number string #{version}" unless
self.class.correct?(version)

@version = version.to_s
@version = version.to_s.dup
@version.strip!
end

Expand Down

0 comments on commit 64949fc

Please sign in to comment.