lib/jsonpath/parser.rb in jsonpath-1.0.6 vs lib/jsonpath/parser.rb in jsonpath-1.0.7
- old
+ new
@@ -112,10 +112,10 @@
def parse_regex(t)
t =~ REGEX
content = $1 || $3
options = $2 || $4
- raise "unsupported regex #{t} use /foo/ style" if !content || !options
+ raise ArgumentError, "unsupported regex #{t} use /foo/ style" if !content || !options
content = content.gsub '\\/', '/'
flags = 0
flags |= Regexp::IGNORECASE if options.include?('i')