diff --git a/lib/ohai/plugins/darwin/memory.rb b/lib/ohai/plugins/darwin/memory.rb index 52a638fd8..b0de73656 100644 --- a/lib/ohai/plugins/darwin/memory.rb +++ b/lib/ohai/plugins/darwin/memory.rb @@ -24,10 +24,10 @@ stdin.close stdout.each do |line| if line =~ /PhysMem:/ - memory[:total] = "#{$1}#{$2}B" if line =~ /(\d+)([A-Z]{1})\s+used/ - memory[:free] = "#{$1}#{$2}B" if line =~ /(\d+)([A-Z]{1})\s+free/ - memory[:active] = "#{$1}#{$2}B" if line =~ /(\d+)([A-Z]{1})\s+active/ - memory[:inactive] = "#{$1}#{$2}B" if line =~ /(\d+)([A-Z]{1})\s+inactive/ + memory[:total] = "#{$1}#{$2}B" if line =~ /(\d+)([a-z]{1})\s+used/i + memory[:free] = "#{$1}#{$2}B" if line =~ /(\d+)([a-z]{1})\s+free/i + memory[:active] = "#{$1}#{$2}B" if line =~ /(\d+)([a-z]{1})\s+active/i + memory[:inactive] = "#{$1}#{$2}B" if line =~ /(\d+)([a-z]{1})\s+inactive/i end end end