mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
a548792aa0
It is possible under some environments to receive an Exception that is not extended with Blamable (e.g. JRuby). ActiveSupport::Dependencies::Loadable#load_dependency blindly call blame_file! on the exception which throws it's own NoMethodError exception and hides the original Exception. This commit fixes #9521
5 lines
116 B
Ruby
5 lines
116 B
Ruby
exception = Exception.new('I am not blamable!')
|
|
class << exception
|
|
undef_method(:blame_file!)
|
|
end
|
|
raise exception
|