Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tweak to exclude-loading rescue logic, suggested by @nobu.
Browse files Browse the repository at this point in the history
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
Original file line number Diff line number Diff line change
@@ -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.