Skip to content
Snippets Groups Projects

Reduce REGEXP_TIMEOUT_SECONDS to 40 seconds

Merged Dominic Couture requested to merge dcouture-regexp-timeout-40 into master
All threads resolved!
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
# frozen_string_literal: true
# Timeout if Regular expression takes more than 45 seconds to compute.
# Timeout if Regular expression takes more than 40 seconds to compute.
# This is a conservative value and is to be evaluated later.
# This value can be overridden using the REGEXP_TIMEOUT_SECONDS environment value
Regexp.timeout = ENV.fetch('REGEXP_TIMEOUT_SECONDS', 45).to_f if RUBY_VERSION > "3.2"
Regexp.timeout = ENV.fetch('REGEXP_TIMEOUT_SECONDS', 40).to_f if RUBY_VERSION > "3.2"
Loading