ruby-changes:14369
From: nobu <ko1@a...>
Date: Wed, 30 Dec 2009 17:50:43 +0900 (JST)
Subject: [ruby-changes:14369] Ruby:r26199 (trunk): * lib/rubygems/source_index.rb (Gem#load_specification): don't use
nobu 2009-12-30 17:45:55 +0900 (Wed, 30 Dec 2009) New Revision: 26199 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26199 Log: * lib/rubygems/source_index.rb (Gem#load_specification): don't use RUBY_VERSION to branch. * lib/rubygems/validator.rb (Gem::TestRunner, Gem#alien): ditto. Modified files: trunk/ChangeLog trunk/lib/rubygems/source_index.rb trunk/lib/rubygems/validator.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 26198) +++ ChangeLog (revision 26199) @@ -1,5 +1,10 @@ -Wed Dec 30 14:13:06 2009 Nobuyoshi Nakada <nobu@r...> +Wed Dec 30 17:45:53 2009 Nobuyoshi Nakada <nobu@r...> + * lib/rubygems/source_index.rb (Gem#load_specification): don't use + RUBY_VERSION to branch. + + * lib/rubygems/validator.rb (Gem::TestRunner, Gem#alien): ditto. + * lib/rubygems.rb: Kernel#gem is already defined, and workaround for home directory and custom_require are no longer needed. Index: lib/rubygems/validator.rb =================================================================== --- lib/rubygems/validator.rb (revision 26198) +++ lib/rubygems/validator.rb (revision 26199) @@ -167,6 +167,7 @@ errors end +=begin if RUBY_VERSION < '1.9' then class TestRunner def initialize(suite, ui) @@ -194,6 +195,7 @@ autoload :TestRunner, 'test/unit/ui/testrunnerutilities' end +=end ## # Runs unit tests for a given gem specification @@ -214,6 +216,7 @@ test_files.each do |f| require f end +=begin if RUBY_VERSION < '1.9' then suite = Test::Unit::TestSuite.new("#{gem_spec.name}-#{gem_spec.version}") @@ -228,6 +231,9 @@ result = MiniTest::Unit.new result.run end +=end + result = MiniTest::Unit.new + result.run result ensure Index: lib/rubygems/source_index.rb =================================================================== --- lib/rubygems/source_index.rb (revision 26198) +++ lib/rubygems/source_index.rb (revision 26199) @@ -85,7 +85,7 @@ def load_specification(file_name) return nil unless file_name and File.exist? file_name - spec_code = if RUBY_VERSION < '1.9' then + spec_code = if !defined?(Encoding) then File.read file_name else File.read file_name, :encoding => 'UTF-8' -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/