Skip to content
Permalink
Browse files
Tweak to exclude-loading rescue logic, suggested by @nobu.
  • Loading branch information
headius committed Jan 5, 2015
1 parent 7b90ff4 commit eeae6ef
Showing 1 changed file with 4 additions and 2 deletions.
@@ -1367,6 +1367,10 @@ def self.inherited klass # :nodoc:
if ENV["EXCLUDES"]
begin
exclude_src = File.read File.join(ENV["EXCLUDES"], klass.inspect.gsub("::", "/") + ".rb")
rescue Errno::ENOENT
# no excludes for this class
else
# excludes available, proceed
excludes = {}
klass.send :instance_variable_set, :@excludes, excludes

@@ -1377,8 +1381,6 @@ def exclude(name, reason)
end

klass.class_eval exclude_src
rescue Errno::ENOENT
# no excludes for this class
end
end

0 comments on commit eeae6ef

Please sign in to comment.