1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #30052 from y-yagi/deprecate_load_error_regexps

Deprecate `LoadError::REGEXPS` constant
This commit is contained in:
Sean Griffin 2017-08-03 18:51:28 -04:00 committed by GitHub
commit 050bbb1f33

View file

@ -1,13 +1,6 @@
# frozen_string_literal: true
class LoadError
REGEXPS = [
/^no such file to load -- (.+)$/i,
/^Missing \w+ (?:file\s*)?([^\s]+.rb)$/i,
/^Missing API definition file in (.+)$/i,
/^cannot load such file -- (.+)$/i,
]
# Returns true if the given path name (except perhaps for the ".rb"
# extension) is the missing file which caused the exception to be raised.
def is_missing?(location)