mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rubygems/source_index.rb (Gem#load_specification): don't use
RUBY_VERSION to branch. * lib/rubygems/validator.rb (Gem::TestRunner, Gem#alien): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
45b750149a
commit
9004431714
3 changed files with 13 additions and 2 deletions
|
@ -1,4 +1,9 @@
|
||||||
Wed Dec 30 14:13:06 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Dec 30 17:45:53 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* 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
|
* lib/rubygems.rb: Kernel#gem is already defined, and workaround
|
||||||
for home directory and custom_require are no longer needed.
|
for home directory and custom_require are no longer needed.
|
||||||
|
|
|
@ -85,7 +85,7 @@ class Gem::SourceIndex
|
||||||
def load_specification(file_name)
|
def load_specification(file_name)
|
||||||
return nil unless file_name and File.exist? 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
|
File.read file_name
|
||||||
else
|
else
|
||||||
File.read file_name, :encoding => 'UTF-8'
|
File.read file_name, :encoding => 'UTF-8'
|
||||||
|
|
|
@ -167,6 +167,7 @@ class Gem::Validator
|
||||||
errors
|
errors
|
||||||
end
|
end
|
||||||
|
|
||||||
|
=begin
|
||||||
if RUBY_VERSION < '1.9' then
|
if RUBY_VERSION < '1.9' then
|
||||||
class TestRunner
|
class TestRunner
|
||||||
def initialize(suite, ui)
|
def initialize(suite, ui)
|
||||||
|
@ -194,6 +195,7 @@ class Gem::Validator
|
||||||
|
|
||||||
autoload :TestRunner, 'test/unit/ui/testrunnerutilities'
|
autoload :TestRunner, 'test/unit/ui/testrunnerutilities'
|
||||||
end
|
end
|
||||||
|
=end
|
||||||
|
|
||||||
##
|
##
|
||||||
# Runs unit tests for a given gem specification
|
# Runs unit tests for a given gem specification
|
||||||
|
@ -214,6 +216,7 @@ class Gem::Validator
|
||||||
|
|
||||||
test_files.each do |f| require f end
|
test_files.each do |f| require f end
|
||||||
|
|
||||||
|
=begin
|
||||||
if RUBY_VERSION < '1.9' then
|
if RUBY_VERSION < '1.9' then
|
||||||
suite = Test::Unit::TestSuite.new("#{gem_spec.name}-#{gem_spec.version}")
|
suite = Test::Unit::TestSuite.new("#{gem_spec.name}-#{gem_spec.version}")
|
||||||
|
|
||||||
|
@ -228,6 +231,9 @@ class Gem::Validator
|
||||||
result = MiniTest::Unit.new
|
result = MiniTest::Unit.new
|
||||||
result.run
|
result.run
|
||||||
end
|
end
|
||||||
|
=end
|
||||||
|
result = MiniTest::Unit.new
|
||||||
|
result.run
|
||||||
|
|
||||||
result
|
result
|
||||||
ensure
|
ensure
|
||||||
|
|
Loading…
Add table
Reference in a new issue