lib/ohai/system.rb in ohai-6.14.0 vs lib/ohai/system.rb in ohai-6.16.0.beta.1

- old
+ new

@@ -19,10 +19,11 @@ require 'ohai/mash' require 'ohai/log' require 'ohai/mixin/from_file' require 'ohai/mixin/command' require 'ohai/mixin/string' +require 'mixlib/shellout' require 'yajl' module Ohai class System @@ -242,11 +243,11 @@ data = @data a.split("/").each do |part| data = data[part] end raise ArgumentError, "I cannot find an attribute named #{a}!" if data.nil? - case a - when Hash,Mash,Array + case data + when Hash,Mash,Array,Fixnum json_pretty_print(data) when String if data.respond_to?(:lines) json_pretty_print(data.lines.to_a) else