Skip to content

Commit

Permalink
! The names of a privately-used undocumented constants are Super Impo…
Browse files Browse the repository at this point in the history
…rtant™.

[git-p4: depot-paths = "//src/minitest/dev/": change = 7800]
  • Loading branch information
zenspider committed Sep 28, 2012
1 parent 88a5037 commit e768bb8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/minitest/unit.rb
Expand Up @@ -61,14 +61,12 @@ def UNDEFINED.inspect # :nodoc:
"UNDEFINED" # again with the rdoc bugs... :(
end

WINDOZE = RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ # :nodoc:

##
# Returns the diff command to use in #diff. Tries to intelligently
# figure out what diff to use.

def self.diff
@diff = if WINDOZE
@diff = if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ then
"diff.exe -u"
else
if system("gdiff", __FILE__, __FILE__)
Expand Down

5 comments on commit e768bb8

@tenderlove
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm glad this egregious injustice and horrible persecution has come to an end, but unfortunately this is not a backwards compatible change. :trollface:

@tenderlove
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit is double plus good. Report all thought crimes to the authorities.

@postmodern
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @zenspider and @tenderlove! The future Rubyists trying to debug minitest on Windows 10 will appreciate this.

@ingeniarius
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

@semaperepelitsa
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this check even there? You can omit ".exe" when running executables in Windows:

C:\>ruby.exe --version
ruby 1.9.3p286 (2012-10-12) [i386-mingw32]

C:\>ruby --version
ruby 1.9.3p286 (2012-10-12) [i386-mingw32]

Please sign in to comment.