summaryrefslogtreecommitdiff
path: root/lib/bundler/yaml_serializer.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2024-01-23 19:14:39 +0900
committergit <svn-admin@ruby-lang.org>2024-01-24 09:11:53 +0000
commit1018dca09a55e7b21d701cfee0171b44ba26fe4a (patch)
treebab2e9accdfa90133ee828ee9e389d36ac0b2a47 /lib/bundler/yaml_serializer.rb
parent53d0cf442a1dfc1616a3870a65d5c867e0fec2dd (diff)
[rubygems/rubygems] Skip to load commented out words
https://github.com/rubygems/rubygems/commit/e6a9148ba2
Diffstat (limited to 'lib/bundler/yaml_serializer.rb')
-rw-r--r--lib/bundler/yaml_serializer.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/bundler/yaml_serializer.rb b/lib/bundler/yaml_serializer.rb
index 37ccc46c26..abc931dc67 100644
--- a/lib/bundler/yaml_serializer.rb
+++ b/lib/bundler/yaml_serializer.rb
@@ -56,6 +56,7 @@ module Bundler
last_hash = nil
last_empty_key = nil
str.split(/\r?\n/) do |line|
+ line = line.split("#", 2).first.strip if line.include?("#")
if match = HASH_REGEX.match(line)
indent, key, quote, val = match.captures
convert_to_backward_compatible_key!(key)