Skip to content

Commit

Permalink
Tweak to exclude-loading rescue logic, suggested by @nobu.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Jan 5, 2015
1 parent 7b90ff4 commit eeae6ef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/mri/lib/minitest/unit.rb
Expand Up @@ -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

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

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

Expand Down

0 comments on commit eeae6ef

Please sign in to comment.