Ruby bindings to RE2, a "fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python".
In plain ruby matching again nil does not raise an error
Regexp.new('a').match(nil)
=> nil
whereas in re2 does.
RE2::Regexp.new('a').match(nil)
TypeError: no implicit conversion of nil into String
from (irb):2:in `match'
from (irb):2
from /Users/skreft/.rvm/rubies/ruby-2.2.1/bin/irb:11:in `<main>'
In plain ruby matching again
nil
does not raise an errorwhereas in
re2
does.