diff --git a/Library/Homebrew/cask/artifact/abstract_flight_block.rb b/Library/Homebrew/cask/artifact/abstract_flight_block.rb index d46011c160..64e4d727bf 100644 --- a/Library/Homebrew/cask/artifact/abstract_flight_block.rb +++ b/Library/Homebrew/cask/artifact/abstract_flight_block.rb @@ -1,7 +1,6 @@ # typed: true # frozen_string_literal: true -require "method_source" require "cask/artifact/abstract_artifact" module Cask @@ -38,6 +37,8 @@ module Cask end def to_h + require "method_source" + directives.transform_values(&:source) end diff --git a/Library/Homebrew/test/cask/cask_spec.rb b/Library/Homebrew/test/cask/cask_spec.rb index d2b9a28c4e..e11a3e4c9b 100644 --- a/Library/Homebrew/test/cask/cask_spec.rb +++ b/Library/Homebrew/test/cask/cask_spec.rb @@ -1,8 +1,6 @@ # typed: false # frozen_string_literal: true -require "method_source" - describe Cask::Cask, :cask do let(:cask) { described_class.new("versioned-cask") }