diff --git a/lib/xcake/core_ext/class.rb b/lib/xcake/core_ext/class.rb index 3634996f..076f0129 100644 --- a/lib/xcake/core_ext/class.rb +++ b/lib/xcake/core_ext/class.rb @@ -7,7 +7,7 @@ module ClassDescendants # Returns all descendants of a class # def descendants - ObjectSpace.each_object(singleton_class).select { |klass| klass < self } + ObjectSpace.each_object(singleton_class).select { |klass| klass < self }.sort_by(&:to_s) end end end