aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/specification.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-04-25 14:09:24 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-05-08 14:13:29 +0900
commit314d7f897ca02c173fa0e3b3e36c69482f71a358 (patch)
tree8f15f5083e13cf2617fed454055e6bb953df668a /lib/rubygems/specification.rb
parentb5a0db8be0086f2d245fd77fd48f89e359d71312 (diff)
downloadruby-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/rubygems/specification.rb')
-rw-r--r--lib/rubygems/specification.rb8
1 files changed, 1 insertions, 7 deletions
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
##