lib/jsonpath.rb in jsonpath-0.7.0 vs lib/jsonpath.rb in jsonpath-0.7.1

- old
+ new

@@ -14,10 +14,10 @@ def initialize(path, opts = nil) @opts = opts scanner = StringScanner.new(path) @path = [] until scanner.eos? - if token = scanner.scan(/\$|@\B|\*|\.\./) + if token = scanner.scan(/\$\B|@\B|\*|\.\./) @path << token elsif token = scanner.scan(/[\$@a-zA-Z0-9:_-]+/) @path << "['#{token}']" elsif token = scanner.scan(/'(.*?)'/) @path << "[#{token}]"