lib/logging/utils.rb in logging-1.6.2 vs lib/logging/utils.rb in logging-1.7.0
- old
+ new
@@ -1,7 +1,8 @@
require 'thread'
+require 'rbconfig'
# --------------------------------------------------------------------------
class Hash
# call-seq:
@@ -163,10 +164,11 @@
ensure
flock LOCK_UN
end
# :stopdoc:
- if %r/mswin|mingw/ =~ RUBY_PLATFORM
+ if Config::CONFIG['host_os'] =~ /mswin|windows|cygwin/i
+ # don't lock files on windows
undef :flock?, :flock_sh
def flock?() yield; end
def flock_sh() yield; end
end
# :startdoc: