Add upstream JSON generator modules
This commit is contained in:
parent
9dcde74e81
commit
1b84c5c8c2
@ -55,7 +55,7 @@ module Homebrew
|
|||||||
|
|
||||||
github_output = ENV.fetch("GITHUB_OUTPUT")
|
github_output = ENV.fetch("GITHUB_OUTPUT")
|
||||||
File.open(github_output, "a") do |f|
|
File.open(github_output, "a") do |f|
|
||||||
f.puts("runners=#{T.unsafe(runners).to_json}")
|
f.puts("runners=#{runners.to_json}")
|
||||||
f.puts("runners_present=#{runners.present?}")
|
f.puts("runners_present=#{runners.present?}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -118,8 +118,8 @@ class MacOSRequirement < Requirement
|
|||||||
|
|
||||||
def to_json(options)
|
def to_json(options)
|
||||||
comp = @comparator.to_s
|
comp = @comparator.to_s
|
||||||
return T.unsafe({ comp => @version.map(&:to_s) }).to_json(options) if @version.is_a?(Array)
|
return { comp => @version.map(&:to_s) }.to_json(options) if @version.is_a?(Array)
|
||||||
|
|
||||||
T.unsafe({ comp => [@version.to_s] }).to_json(options)
|
{ comp => [@version.to_s] }.to_json(options)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -3,6 +3,14 @@
|
|||||||
# This file contains temporary definitions for fixes that have
|
# This file contains temporary definitions for fixes that have
|
||||||
# been submitted upstream to https://github.com/sorbet/sorbet.
|
# been submitted upstream to https://github.com/sorbet/sorbet.
|
||||||
|
|
||||||
|
# https://github.com/sorbet/sorbet/pull/7682
|
||||||
|
class Array
|
||||||
|
include JSON::Ext::Generator::GeneratorMethods::Array
|
||||||
|
end
|
||||||
|
class Hash
|
||||||
|
include JSON::Ext::Generator::GeneratorMethods::Hash
|
||||||
|
end
|
||||||
|
|
||||||
# https://github.com/sorbet/sorbet/pull/7650
|
# https://github.com/sorbet/sorbet/pull/7650
|
||||||
class Etc::Group < Struct
|
class Etc::Group < Struct
|
||||||
sig { returns(Integer) }
|
sig { returns(Integer) }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user