fixes #2100 - fix regexp overflow on MRI 1.8 with older safemode/ruby_parser