diff --git a/lib/yaml/ypath.rb b/lib/yaml/ypath.rb index 713c4de76e..81348ca043 100644 --- a/lib/yaml/ypath.rb +++ b/lib/yaml/ypath.rb @@ -10,7 +10,7 @@ module YAML @segments = [] @predicates = [] @flags = nil - while str =~ /^\/?(\/|[^\/[]+)(?:\[([^\]]+)\])?/ + while str =~ /^\/?(\/|[^\/\[]+)(?:\[([^\]]+)\])?/ @segments.push $1 @predicates.push $2 str = $'