From fb39128dce7babcb1b8c6d92bfa9e85eb7f7118e Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 24 Jan 2024 10:51:21 +0900 Subject: [PATCH] [rubygems/rubygems] Added test for rubygems https://github.com/rubygems/rubygems/commit/64405147c9 --- test/rubygems/test_gem_config_file.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/rubygems/test_gem_config_file.rb b/test/rubygems/test_gem_config_file.rb index ad120d2aaa..ae6739db98 100644 --- a/test/rubygems/test_gem_config_file.rb +++ b/test/rubygems/test_gem_config_file.rb @@ -548,4 +548,14 @@ if you believe they were disclosed to a third party. assert_equal("---\n:foo: \"bar\"\n", actual) end + + def test_handle_comment + yaml = <<~YAML + --- + :foo: bar # buzz + YAML + + actual = Gem::ConfigFile.load_with_rubygems_config_hash(yaml) + assert_equal("bar", actual[:foo]) + end end