summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-03-21 12:16:42 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2016-03-21 13:53:29 -0700
commitd7cb6fc66b7563d79d25b952ea1e7220dc273dfa (patch)
tree71c1e35f0759fbb508e7a97ca6bf05d17fd155a7
parent92b9ea91bbec9c89ef8c831426a845b27e09ce54 (diff)
downloadchef-d7cb6fc66b7563d79d25b952ea1e7220dc273dfa.tar.gz
back out the to_s.to_s hack
-rw-r--r--lib/chef/resource.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb
index 53b4c52052..21b2308688 100644
--- a/lib/chef/resource.rb
+++ b/lib/chef/resource.rb
@@ -1316,11 +1316,7 @@ class Chef
# life as well.
@@sorted_descendants = nil
def self.sorted_descendants
- # so it turns out Class.to_s just blindly returns the name of the class,
- # which can be a Symbol in addition to being a String. as a result, we
- # may get a Symbol back from Class.to_s, so we call #to_s on that again.
- # (buggy on at least ruby-2.4.4)
- @@sorted_descendants ||= descendants.sort_by { |x| x.to_s.to_s }
+ @@sorted_descendants ||= descendants.sort_by { |x| x.to_s }
end
def self.inherited(child)