Skip to content

Commit

Permalink
Merge pull request #18343 from bdunne/include_concern_errors
Browse files Browse the repository at this point in the history
Re-raise the LoadError if it is not for the file we are trying to load
  • Loading branch information
jrafanie authored Jan 9, 2019
2 parents a05b8cb + 87cb1fd commit 1ac113a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/extensions/as_include_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def include_concern(mod)
begin
to_include = "#{name}::#{mod}"
require_dependency to_include.underscore
rescue LoadError
rescue LoadError => err
raise unless err.message.include?(to_include.underscore)
to_include = mod
require_dependency to_include.underscore
end
Expand Down

0 comments on commit 1ac113a

Please sign in to comment.