diff --git a/Library/Homebrew/cask/topological_hash.rb b/Library/Homebrew/cask/topological_hash.rb index 79c0485bf4..12b6f588e7 100644 --- a/Library/Homebrew/cask/topological_hash.rb +++ b/Library/Homebrew/cask/topological_hash.rb @@ -1,4 +1,4 @@ -# typed: false +# typed: true # frozen_string_literal: true require "tsort" @@ -8,7 +8,11 @@ module Cask class TopologicalHash < Hash include TSort - alias tsort_each_node each_key + private + + def tsort_each_node(&block) + each_key(&block) + end def tsort_each_child(node, &block) fetch(node).each(&block)