lib/jsonpath/enumerable.rb in jsonpath-0.8.11 vs lib/jsonpath/enumerable.rb in jsonpath-0.8.12

- old
+ new

@@ -109,11 +109,10 @@ return default if exp.nil? || exp.empty? return Integer(exp) if exp[0] != '(' return nil unless @_current_node identifiers = /@?((?<!\d)\.(?!\d)(\w+))+/.match(exp) - unless identifiers.nil? || - @_current_node.methods.include?(identifiers[2].to_sym) + unless identifiers.nil? || @_current_node.methods.include?(identifiers[2].to_sym) exp_to_eval = exp.dup exp_to_eval[identifiers[0]] = identifiers[0].split('.').map do |el| el == '@' ? '@' : "['#{el}']" end.join begin