summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2017-04-27 16:51:31 -0700
committerTim Smith <tsmith@chef.io>2017-04-27 16:51:31 -0700
commitc94b3088483f5def87d04599580b3222f2d69a9d (patch)
tree5df0fc154cb9811fc132d130d8cc3ebd2834bc41
parentd63e182f8bc61754c30184c1c4e3e789784496a8 (diff)
downloadohai-c94b3088483f5def87d04599580b3222f2d69a9d.tar.gz
Remove double split
Not sure what the goal was here. The sort always works. Just roll with it Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/ohai/mixin/ec2_metadata.rb1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/ohai/mixin/ec2_metadata.rb b/lib/ohai/mixin/ec2_metadata.rb
index ba0e7c2d..666d6382 100644
--- a/lib/ohai/mixin/ec2_metadata.rb
+++ b/lib/ohai/mixin/ec2_metadata.rb
@@ -58,7 +58,6 @@ module Ohai
end
# Note: Sorting the list of versions may have unintended consequences in
# non-EC2 environments. It appears to be safe in EC2 as of 2013-04-12.
- versions = response.body.split("\n")
versions = response.body.split("\n").sort
until versions.empty? || EC2_SUPPORTED_VERSIONS.include?(versions.last)
pv = versions.pop