diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-04-25 14:09:24 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-05-08 14:13:29 +0900 |
commit | 314d7f897ca02c173fa0e3b3e36c69482f71a358 (patch) | |
tree | 8f15f5083e13cf2617fed454055e6bb953df668a /lib | |
parent | b5a0db8be0086f2d245fd77fd48f89e359d71312 (diff) | |
download | ruby-314d7f897ca02c173fa0e3b3e36c69482f71a358.tar.gz |
Remove `builder` gem requirement for `gem regenerate_index`
This requirement was introduced 14 years ago in
7ce7039b390440754954df5efea619e9f57ef823, and I don't think it's
necessary anymore. I made several tests introducing UTF-8 characters in
gemspec files and generating indexes out of them, and couldn't find any
issues. Gemspecs are read with UTF-8 encoding these days.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rubygems/indexer.rb | 10 | ||||
-rw-r--r-- | lib/rubygems/specification.rb | 8 | ||||
-rw-r--r-- | lib/rubygems/test_case.rb | 6 |
3 files changed, 1 insertions, 23 deletions
diff --git a/lib/rubygems/indexer.rb b/lib/rubygems/indexer.rb index 4d199868fb..75bd824c9e 100644 --- a/lib/rubygems/indexer.rb +++ b/lib/rubygems/indexer.rb @@ -11,11 +11,6 @@ rescue LoadError # this rubygems + old ruby else # this rubygems + ruby trunk with bundler rescue_exceptions << Bundler::GemfileNotFound end -begin - gem 'builder' - require 'builder/xchar' -rescue *rescue_exceptions -end ## # Top level class for building the gem repository index. @@ -62,11 +57,6 @@ class Gem::Indexer require 'tmpdir' require 'zlib' - unless defined?(Builder::XChar) - raise "Gem::Indexer requires that the XML Builder library be installed:" + - "\n\tgem install builder" - end - options = { :build_modern => true }.merge options @build_modern = options[:build_modern] diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index bcb5da52a3..9f6cdea8ad 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -1447,13 +1447,7 @@ class Gem::Specification < Gem::BasicSpecification # HACK the #to_s is in here because RSpec has an Array of Arrays of # Strings for authors. Need a way to disallow bad values on gemspec # generation. (Probably won't happen.) - string = string.to_s - - begin - Builder::XChar.encode string - rescue NameError, NoMethodError - string.to_xs - end + string.to_s end ## diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb index 6e9c50d9a5..bb1ce280a4 100644 --- a/lib/rubygems/test_case.rb +++ b/lib/rubygems/test_case.rb @@ -1544,10 +1544,4 @@ begin rescue LoadError, Gem::LoadError end -begin - gem 'builder' - require 'builder/xchar' -rescue LoadError, Gem::LoadError -end - require 'rubygems/test_utilities' |