summaryrefslogtreecommitdiff
path: root/lib/rubygems/specification.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-12-05 19:03:20 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-07-27 09:25:56 +0900
commit88e46cf6b83e2ca701cf122756fef9bc2550e845 (patch)
tree7ae3b612120e82cf36d78ce691bd8c7463a31bc7 /lib/rubygems/specification.rb
parent6bcedabfdde74a21b8e1c93ec639afbb9698474b (diff)
[rubygems/rubygems] Remove all `syck` traces from `rubygems`
After reading [this blog post](https://blog.rubygems.org/2011/08/31/shaving-the-yaml-yak.html), published almost 10 years ago already, my understanding is that this problem could come up in two ways: * Rubygems.org serving corrupted gemspecs". As far as I understand this was fixed in rubygems.org a lot time ago, since https://github.com/rubygems/rubygems.org/pull/331. * Clients having a ten years old gemspec cache with some of these bad gemspecs. In this case, there's no easy solution but I think ten years is enough and rebuilding the cache should do the trick. So, I think it's time we remove this. https://github.com/rubygems/rubygems/commit/afcb15d556
Diffstat (limited to 'lib/rubygems/specification.rb')
-rw-r--r--lib/rubygems/specification.rb6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index 14226796f1..ff345bf7a3 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -1690,12 +1690,6 @@ class Gem::Specification < Gem::BasicSpecification
when String then
if DateTimeFormat =~ date
Time.utc($1.to_i, $2.to_i, $3.to_i)
-
- # Workaround for where the date format output from psych isn't
- # parsed as a Time object by syck and thus comes through as a
- # string.
- elsif /\A(\d{4})-(\d{2})-(\d{2}) \d{2}:\d{2}:\d{2}\.\d+?Z\z/ =~ date
- Time.utc($1.to_i, $2.to_i, $3.to_i)
else
raise(Gem::InvalidSpecificationException,
"invalid date format in specification: #{date.inspect}")