Permalink
Browse files

Better platform check.

  • Loading branch information...
1 parent 13b7856 commit b2d9f49052a90e65ea133ce2afb49ca2a697dc39 thomas committed Apr 19, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/zip/zip.rb
View
@@ -7,6 +7,7 @@
require 'zlib'
require 'zip/stdrubyext'
require 'zip/ioextras'
+require 'rbconfig'
if Tempfile.superclass == SimpleDelegator
require 'zip/tempfile_bugfixed'
@@ -25,7 +26,7 @@ module Zip
RUBY_MINOR_VERSION = RUBY_VERSION.split(".")[1].to_i
- RUNNING_ON_WINDOWS = /mswin32|cygwin|mingw|bccwin/ =~ RUBY_PLATFORM
+ RUNNING_ON_WINDOWS = Config::CONFIG['host_os'] =~ /^win|mswin/i
# Ruby 1.7.x compatibility
# In ruby 1.6.x and 1.8.0 reading from an empty stream returns

0 comments on commit b2d9f49

Please sign in to comment.