diff options
author | Tim Smith <tsmith@chef.io> | 2020-10-30 15:48:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-30 15:48:21 -0700 |
commit | 59ba43f0500c7c83de62293df1ae95e75873b52c (patch) | |
tree | b0ab19be39a65215cc54e10d20beb6054e647c22 | |
parent | e5ecdfd02cf2a21ef49a16a3551250ad05e922d4 (diff) | |
parent | baf22b9b53035d870220e9932ccf900aed152c35 (diff) | |
download | ohai-59ba43f0500c7c83de62293df1ae95e75873b52c.tar.gz |
Merge pull request #1550 from chef/faster_splits
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/ohai/plugins/aix/uptime.rb | 4 | ||||
-rw-r--r-- | lib/ohai/plugins/solaris2/virtualization.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/ohai/plugins/aix/uptime.rb b/lib/ohai/plugins/aix/uptime.rb index b85a290e..7b5d60b3 100644 --- a/lib/ohai/plugins/aix/uptime.rb +++ b/lib/ohai/plugins/aix/uptime.rb @@ -40,9 +40,9 @@ Ohai.plugin(:Uptime) do when /^\d+-\d/ (d, h, m, s) = so.split(/[-:]/) when /^\d+:\d+:\d/ - (h, m, s) = so.split(/:/) + (h, m, s) = so.split(":") else - (m, s) = so.split(/:/) + (m, s) = so.split(":") end elapsed_seconds = ((d.to_i * 86400) + (h.to_i * 3600) + (m.to_i * 60) + s.to_i) diff --git a/lib/ohai/plugins/solaris2/virtualization.rb b/lib/ohai/plugins/solaris2/virtualization.rb index 8912a091..3f82f0a0 100644 --- a/lib/ohai/plugins/solaris2/virtualization.rb +++ b/lib/ohai/plugins/solaris2/virtualization.rb @@ -55,7 +55,7 @@ Ohai.plugin(:Virtualization) do if File.executable?("/usr/sbin/zoneadm") zones = Mash.new shell_out("zoneadm list -pc").stdout.lines do |line| - info = line.chomp.split(/:/) + info = line.chomp.split(":") zones[info[1]] = { "id" => info[0], "state" => info[2], |