summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-07-19 22:58:01 +0900
committergit <svn-admin@ruby-lang.org>2023-07-19 23:20:54 +0000
commit419fbc77e0c05358f8eb22392cd99050c4dfaf5f (patch)
tree8952bad6cd1031140286dc8ea2080cda43510543 /test
parent84b5274143bf54f77f9950eeba72a64cc761dd45 (diff)
[rubygems/rubygems] Clear `YAML` constant if it was undefined previously
https://github.com/rubygems/rubygems/commit/31d0311258
Diffstat (limited to 'test')
-rw-r--r--test/rubygems/test_gem_specification.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
index e4e908c98f..6a893f09c9 100644
--- a/test/rubygems/test_gem_specification.rb
+++ b/test/rubygems/test_gem_specification.rb
@@ -1071,19 +1071,27 @@ dependencies: []
end
def test_handles_private_null_type
+ yaml_defined = Object.const_defined?("YAML")
+
path = File.expand_path "data/pry-0.4.7.gemspec.rz", __dir__
data = Marshal.load Gem::Util.inflate(Gem.read_binary(path))
assert_instance_of Gem::Specification, data
+
+ assert_equal(yaml_defined, Object.const_defined?("YAML"))
end
def test_handles_dependencies_with_syck_requirements_bug
+ yaml_defined = Object.const_defined?("YAML")
+
path = File.expand_path "data/excon-0.7.7.gemspec.rz", __dir__
data = Marshal.load Gem::Util.inflate(Gem.read_binary(path))
assert_instance_of Gem::Specification, data
+
+ assert_equal(yaml_defined, Object.const_defined?("YAML"))
end
def test_initialize