Skip to content

Commit

Permalink
- Fixed Assertions#diff from recalculating if set to nil
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//src/minitest/dev/": change = 12113]
  • Loading branch information
zenspider committed Jun 9, 2019
1 parent 4103a10 commit 9116a29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/minitest/assertions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ def UNDEFINED.inspect # :nodoc:
# figure out what diff to use.

def self.diff
return @diff if defined? @diff

@diff = if (RbConfig::CONFIG["host_os"] =~ /mswin|mingw/ &&
system("diff.exe", __FILE__, __FILE__)) then
"diff.exe -u"
Expand All @@ -38,9 +40,7 @@ def self.diff
"diff -u"
else
nil
end unless defined? @diff

@diff
end
end

##
Expand Down

0 comments on commit 9116a29

Please sign in to comment.