summaryrefslogtreecommitdiff
path: root/spec/bundler
diff options
context:
space:
mode:
authorMercedes Bernard <mercedesrbernard@gmail.com>2023-02-16 13:46:51 -0600
committergit <svn-admin@ruby-lang.org>2023-02-23 08:50:05 +0000
commit10a393c25dff1d7abe656644674e2fb69a06ea66 (patch)
tree4a91a82cb37d93e1f8103f8738e882c560feabaa /spec/bundler
parente965133f56c2c7dca23d4172249aea056e2a449a (diff)
[rubygems/rubygems] add safe_load_marshal for gem::version and gem::spec
https://github.com/rubygems/rubygems/commit/2ea2ead1b3
Diffstat (limited to 'spec/bundler')
-rw-r--r--spec/bundler/bundler/bundler_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/bundler/bundler/bundler_spec.rb b/spec/bundler/bundler/bundler_spec.rb
index 5b07f8159b..862a2c3e07 100644
--- a/spec/bundler/bundler/bundler_spec.rb
+++ b/spec/bundler/bundler/bundler_spec.rb
@@ -27,6 +27,18 @@ RSpec.describe Bundler do
data = Marshal.dump(simple_structure)
expect(Bundler.safe_load_marshal(data)).to eq(simple_structure)
end
+
+ it "loads Gem::Version" do
+ gem_version = Gem::Version.new("3.7.2")
+ data = Marshal.dump(gem_version)
+ expect(Bundler.safe_load_marshal(data)).to eq(gem_version)
+ end
+
+ it "loads Gem::Specification" do
+ gem_spec = Gem::Specification.new("name", "3.7.2")
+ data = Marshal.dump(gem_spec)
+ expect(Bundler.safe_load_marshal(data)).to eq(gem_spec)
+ end
end
describe "#load_gemspec_uncached" do