diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2021-10-21 14:24:37 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2021-10-21 14:24:37 -0700 |
commit | 3892e40891342ab21e14561d322e08e4bf86073e (patch) | |
tree | 3b9fa5175f9fc8c4cda96d296702a97244fd7d94 | |
parent | a098e163490ad6604338d3d04fed601d18255693 (diff) | |
download | ohai-3892e40891342ab21e14561d322e08e4bf86073e.tar.gz |
omit SortedSet directly from ConstantHelper
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r-- | lib/ohai/mixin/constant_helper.rb | 2 | ||||
-rw-r--r-- | lib/ohai/plugins/filesystem.rb | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/ohai/mixin/constant_helper.rb b/lib/ohai/mixin/constant_helper.rb index a02aa6fa..933d4ed0 100644 --- a/lib/ohai/mixin/constant_helper.rb +++ b/lib/ohai/mixin/constant_helper.rb @@ -23,7 +23,7 @@ module Ohai module ConstantHelper def remove_constants - new_object_constants = Object.constants - @object_pristine.constants + new_object_constants = Object.constants - @object_pristine.constants - [ :SortedSet ] new_object_constants.each do |constant| Object.send(:remove_const, constant) unless Object.const_get(constant).is_a?(Module) end diff --git a/lib/ohai/plugins/filesystem.rb b/lib/ohai/plugins/filesystem.rb index 51e53c73..e86d0908 100644 --- a/lib/ohai/plugins/filesystem.rb +++ b/lib/ohai/plugins/filesystem.rb @@ -23,8 +23,6 @@ # limitations under the License. # -require "set" unless defined?(Set) - Ohai.plugin(:Filesystem) do provides "filesystem".freeze @@ -699,6 +697,7 @@ Ohai.plugin(:Filesystem) do end collect_data(:windows) do + require "set" unless defined?(Set) require "wmi-lite/wmi" unless defined?(WmiLite::Wmi) require_relative "../mash" |