diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2023-08-20 23:37:18 -0700 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-09-20 02:03:01 +0000 |
commit | f0d1b0cc4b5a99de9dc709b8f43d8be8e18c7323 (patch) | |
tree | 24256c1e7087a84232a6bbbf69e4f4b1aa9950cd | |
parent | fe90e83b482b7df84f6f1c7be70155df46dd4d3c (diff) | |
download | ruby-f0d1b0cc4b5a99de9dc709b8f43d8be8e18c7323.tar.gz |
[rubygems/rubygems] Allow bundler to load from the dependency api
https://github.com/rubygems/rubygems/commit/3303957286
-rw-r--r-- | lib/rubygems/safe_marshal.rb | 7 | ||||
-rw-r--r-- | lib/rubygems/safe_marshal/visitors/to_ruby.rb | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/rubygems/safe_marshal.rb b/lib/rubygems/safe_marshal.rb index fb8c23f7f6..215f851167 100644 --- a/lib/rubygems/safe_marshal.rb +++ b/lib/rubygems/safe_marshal.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require "stringio" + require_relative "safe_marshal/reader" require_relative "safe_marshal/visitors/to_ruby" @@ -31,6 +33,11 @@ module Gem PERMITTED_SYMBOLS = %w[ development runtime + + name + number + platform + dependencies ].freeze private_constant :PERMITTED_SYMBOLS diff --git a/lib/rubygems/safe_marshal/visitors/to_ruby.rb b/lib/rubygems/safe_marshal/visitors/to_ruby.rb index 8d5c05e3ca..fb0c75598c 100644 --- a/lib/rubygems/safe_marshal/visitors/to_ruby.rb +++ b/lib/rubygems/safe_marshal/visitors/to_ruby.rb @@ -258,7 +258,7 @@ module Gem::SafeMarshal end COMPAT_CLASSES = {}.tap do |h| - h[Rational] = RationalCompat if RUBY_VERSION >= "3" + h[Rational] = RationalCompat end.freeze private_constant :COMPAT_CLASSES |