summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)