summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2014-10-14 12:08:43 -0700
committerJay Mundrawala <jdmundrawala@gmail.com>2014-10-22 13:03:21 -0700
commit68e9da3ab941c2a9c73618ac2dfc79c1ff98f290 (patch)
treedc7718b3bb1c2af106b2e1c580f3dc43dcf225e6
parentb63de42a6c3f5297c0710e22eaf9846b24155f64 (diff)
downloadchef-68e9da3ab941c2a9c73618ac2dfc79c1ff98f290.tar.gz
suppressing annoying warnings due to already imported constants
-rw-r--r--lib/chef/logging/windows_eventlog.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/chef/logging/windows_eventlog.rb b/lib/chef/logging/windows_eventlog.rb
index f4536a9ebe..16dedb12ed 100644
--- a/lib/chef/logging/windows_eventlog.rb
+++ b/lib/chef/logging/windows_eventlog.rb
@@ -1,4 +1,8 @@
-require 'chef/logging/event_log'
+[:INFINITE, :WAIT_FAILED, :FORMAT_MESSAGE_IGNORE_INSERTS, :ERROR_INSUFFICIENT_BUFFER].each do |c|
+ # These are redefined in 'win32/eventlog'
+ Windows::Constants.send(:remove_const, c)
+end
+require 'chef/logging/eventlog'
require 'win32/eventlog'
include Win32