Merge branch 'master' into portable-ruby-3.3.8

This commit is contained in:
Patrick Linnane 2025-04-13 18:19:27 -07:00 committed by GitHub
commit 0091846643
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
142 changed files with 208 additions and 212 deletions

View File

@ -52,7 +52,7 @@ jobs:
run: vale docs/ run: vale docs/
- name: Install Ruby - name: Install Ruby
uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1.229.0 uses: ruby/setup-ruby@e5ac7b085f6e63d49c8973eb0c6e04d876b881f1 # v1.230.0
with: with:
bundler-cache: true bundler-cache: true
working-directory: docs working-directory: docs

View File

@ -42,7 +42,7 @@ jobs:
persist-credentials: false persist-credentials: false
- name: Install Ruby - name: Install Ruby
uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1.229.0 uses: ruby/setup-ruby@e5ac7b085f6e63d49c8973eb0c6e04d876b881f1 # v1.230.0
with: with:
bundler-cache: true bundler-cache: true
working-directory: rubydoc working-directory: rubydoc

View File

@ -7,7 +7,7 @@ GEM
base64 (0.2.0) base64 (0.2.0)
benchmark (0.4.0) benchmark (0.4.0)
bigdecimal (3.1.9) bigdecimal (3.1.9)
bindata (2.5.0) bindata (2.5.1)
coderay (1.1.3) coderay (1.1.3)
concurrent-ruby (1.3.5) concurrent-ruby (1.3.5)
diff-lcs (1.6.1) diff-lcs (1.6.1)
@ -88,7 +88,7 @@ GEM
rubocop-ast (>= 1.44.0, < 2.0) rubocop-ast (>= 1.44.0, < 2.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0) unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.44.0) rubocop-ast (1.44.1)
parser (>= 3.3.7.2) parser (>= 3.3.7.2)
prism (~> 1.4) prism (~> 1.4)
rubocop-md (2.0.0) rubocop-md (2.0.0)
@ -121,15 +121,15 @@ GEM
simplecov-html (0.13.1) simplecov-html (0.13.1)
simplecov_json_formatter (0.1.4) simplecov_json_formatter (0.1.4)
simpleidn (0.2.3) simpleidn (0.2.3)
sorbet (0.5.12003) sorbet (0.5.12010)
sorbet-static (= 0.5.12003) sorbet-static (= 0.5.12010)
sorbet-runtime (0.5.12003) sorbet-runtime (0.5.12010)
sorbet-static (0.5.12003-aarch64-linux) sorbet-static (0.5.12010-aarch64-linux)
sorbet-static (0.5.12003-universal-darwin) sorbet-static (0.5.12010-universal-darwin)
sorbet-static (0.5.12003-x86_64-linux) sorbet-static (0.5.12010-x86_64-linux)
sorbet-static-and-runtime (0.5.12003) sorbet-static-and-runtime (0.5.12010)
sorbet (= 0.5.12003) sorbet (= 0.5.12010)
sorbet-runtime (= 0.5.12003) sorbet-runtime (= 0.5.12010)
spoom (1.6.1) spoom (1.6.1)
erubi (>= 1.10.0) erubi (>= 1.10.0)
prism (>= 0.28.0) prism (>= 0.28.0)

View File

@ -145,11 +145,13 @@ module OS
return return
end end
oclp_support_tier = Hardware::CPU.features.include?(:pclmulqdq) ? 2 : 3
<<~EOS <<~EOS
You have booted macOS using OpenCore Legacy Patcher. You have booted macOS using OpenCore Legacy Patcher.
We do not provide support for this configuration. We do not provide support for this configuration.
#{support_tier_message(tier: 2)} #{support_tier_message(tier: oclp_support_tier)}
EOS EOS
end end

View File

@ -40,7 +40,7 @@ module OS
::Hardware::CPU.sysctl_bool("sysctl.proc_translated") ::Hardware::CPU.sysctl_bool("sysctl.proc_translated")
end end
def features def self.features
@features ||= ::Hardware::CPU.sysctl_n( @features ||= ::Hardware::CPU.sysctl_n(
"machdep.cpu.features", "machdep.cpu.features",
"machdep.cpu.extfeatures", "machdep.cpu.extfeatures",

View File

@ -320,6 +320,7 @@ module FormulaCellarChecks
return unless dot_brew_formula.exist? return unless dot_brew_formula.exist?
return unless dot_brew_formula.read.include? "ENV.runtime_cpu_detection" return unless dot_brew_formula.read.include? "ENV.runtime_cpu_detection"
return if formula.tap&.audit_exception(:no_cpuid_allowlist, formula.name)
# macOS `objdump` is a bit slow, so we prioritise llvm's `llvm-objdump` (~5.7x faster) # macOS `objdump` is a bit slow, so we prioritise llvm's `llvm-objdump` (~5.7x faster)
# or binutils' `objdump` (~1.8x faster) if they are installed. # or binutils' `objdump` (~1.8x faster) if they are installed.

View File

@ -2490,7 +2490,7 @@ end
# A singleton registry of all registered classes. # A singleton registry of all registered classes.
# #
# source://bindata//lib/bindata/registry.rb#133 # source://bindata//lib/bindata/registry.rb#128
BinData::RegisteredClasses = T.let(T.unsafe(nil), BinData::Registry) BinData::RegisteredClasses = T.let(T.unsafe(nil), BinData::Registry)
# This registry contains a register of name -> class mappings. # This registry contains a register of name -> class mappings.
@ -2516,6 +2516,8 @@ class BinData::Registry
# source://bindata//lib/bindata/registry.rb#21 # source://bindata//lib/bindata/registry.rb#21
def initialize; end def initialize; end
# @raise [UnRegisteredTypeError]
#
# source://bindata//lib/bindata/registry.rb#38 # source://bindata//lib/bindata/registry.rb#38
def lookup(name, hints = T.unsafe(nil)); end def lookup(name, hints = T.unsafe(nil)); end
@ -2524,7 +2526,7 @@ class BinData::Registry
# Convert CamelCase +name+ to underscore style. # Convert CamelCase +name+ to underscore style.
# #
# source://bindata//lib/bindata/registry.rb#50 # source://bindata//lib/bindata/registry.rb#58
def underscore_name(name); end def underscore_name(name); end
# source://bindata//lib/bindata/registry.rb#34 # source://bindata//lib/bindata/registry.rb#34
@ -2532,24 +2534,19 @@ class BinData::Registry
private private
# source://bindata//lib/bindata/registry.rb#95 # source://bindata//lib/bindata/registry.rb#96
def name_with_endian(name, endian); end def name_with_endian(name, endian); end
# source://bindata//lib/bindata/registry.rb#86 # source://bindata//lib/bindata/registry.rb#87
def name_with_prefix(name, prefix); end def name_with_prefix(name, prefix); end
# source://bindata//lib/bindata/registry.rb#63 # source://bindata//lib/bindata/registry.rb#107
def normalize_name(name, hints); end
# source://bindata//lib/bindata/registry.rb#112
def register_dynamic_class(name); end def register_dynamic_class(name); end
# @return [Boolean] # source://bindata//lib/bindata/registry.rb#71
# def search_names(name, hints); end
# source://bindata//lib/bindata/registry.rb#106
def registered?(name); end
# source://bindata//lib/bindata/registry.rb#123 # source://bindata//lib/bindata/registry.rb#118
def warn_if_name_is_already_registered(name, class_to_register); end def warn_if_name_is_already_registered(name, class_to_register); end
end end

View File

@ -5094,116 +5094,116 @@ class RuboCop::AST::NodePattern::Parser < ::Racc::Parser
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#19 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#19
def initialize(builder = T.unsafe(nil)); end def initialize(builder = T.unsafe(nil)); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#333 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#335
def _reduce_10(val, _values); end def _reduce_10(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#337 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#339
def _reduce_11(val, _values); end def _reduce_11(val, _values); end
# reduce 12 omitted # reduce 12 omitted
# #
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#343 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#345
def _reduce_13(val, _values); end def _reduce_13(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#347 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#349
def _reduce_14(val, _values); end def _reduce_14(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#351 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#353
def _reduce_15(val, _values); end def _reduce_15(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#355 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#357
def _reduce_16(val, _values); end def _reduce_16(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#359 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#361
def _reduce_17(val, _values); end def _reduce_17(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#363 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#365
def _reduce_18(val, _values); end def _reduce_18(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#367 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#369
def _reduce_19(val, _values); end def _reduce_19(val, _values); end
# reduce 1 omitted # reduce 1 omitted
# #
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#301 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#303
def _reduce_2(val, _values); end def _reduce_2(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#371 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#373
def _reduce_20(val, _values); end def _reduce_20(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#375 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#377
def _reduce_21(val, _values); end def _reduce_21(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#379 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#381
def _reduce_22(val, _values); end def _reduce_22(val, _values); end
# reduce 24 omitted # reduce 24 omitted
# #
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#387 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#389
def _reduce_25(val, _values); end def _reduce_25(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#393 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#395
def _reduce_26(val, _values); end def _reduce_26(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#305 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#307
def _reduce_3(val, _values); end def _reduce_3(val, _values); end
# reduce 32 omitted # reduce 32 omitted
# #
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#413 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#415
def _reduce_33(val, _values); end def _reduce_33(val, _values); end
# reduce 36 omitted # reduce 36 omitted
# #
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#423 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#425
def _reduce_37(val, _values); end def _reduce_37(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#427 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#429
def _reduce_38(val, _values); end def _reduce_38(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#431 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#433
def _reduce_39(val, _values); end def _reduce_39(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#309 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#311
def _reduce_4(val, _values); end def _reduce_4(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#435 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#437
def _reduce_40(val, _values); end def _reduce_40(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#439 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#441
def _reduce_41(val, _values); end def _reduce_41(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#443 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#445
def _reduce_42(val, _values); end def _reduce_42(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#447 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#449
def _reduce_43(val, _values); end def _reduce_43(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#451 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#453
def _reduce_44(val, _values); end def _reduce_44(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#455 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#457
def _reduce_45(val, _values); end def _reduce_45(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#459 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#461
def _reduce_46(val, _values); end def _reduce_46(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#313 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#315
def _reduce_5(val, _values); end def _reduce_5(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#317 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#319
def _reduce_6(val, _values); end def _reduce_6(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#321 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#323
def _reduce_7(val, _values); end def _reduce_7(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#325 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#327
def _reduce_8(val, _values); end def _reduce_8(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#329 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#331
def _reduce_9(val, _values); end def _reduce_9(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#463 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#465
def _reduce_none(val, _values); end def _reduce_none(val, _values); end
# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19
@ -5263,10 +5263,10 @@ RuboCop::AST::NodePattern::Parser::Lexer = RuboCop::AST::NodePattern::Lexer
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#227 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#227
RuboCop::AST::NodePattern::Parser::Racc_arg = T.let(T.unsafe(nil), Array) RuboCop::AST::NodePattern::Parser::Racc_arg = T.let(T.unsafe(nil), Array)
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#293 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#295
RuboCop::AST::NodePattern::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) RuboCop::AST::NodePattern::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass)
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#243 # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#244
RuboCop::AST::NodePattern::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) RuboCop::AST::NodePattern::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array)
# Overrides Parser to use `WithMeta` variants and provide additional methods # Overrides Parser to use `WithMeta` variants and provide additional methods
@ -7021,7 +7021,7 @@ module RuboCop::AST::Traversal
# source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145
def on_dsym(node); end def on_dsym(node); end
# source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 # source://rubocop-ast//lib/rubocop/ast/traversal.rb#148
def on_eflipflop(node); end def on_eflipflop(node); end
# source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132
@ -7078,7 +7078,7 @@ module RuboCop::AST::Traversal
# source://rubocop-ast//lib/rubocop/ast/traversal.rb#137 # source://rubocop-ast//lib/rubocop/ast/traversal.rb#137
def on_if_guard(node); end def on_if_guard(node); end
# source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 # source://rubocop-ast//lib/rubocop/ast/traversal.rb#148
def on_iflipflop(node); end def on_iflipflop(node); end
# source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145
@ -7505,28 +7505,28 @@ class RuboCop::AST::YieldNode < ::RuboCop::AST::Node
end end
class RuboCop::CommentConfig class RuboCop::CommentConfig
# source://rubocop/1.75.1/lib/rubocop/comment_config.rb#34 # source://rubocop/1.75.2/lib/rubocop/comment_config.rb#34
def initialize(processed_source); end def initialize(processed_source); end
# source://rubocop/1.75.1/lib/rubocop/comment_config.rb#63 # source://rubocop/1.75.2/lib/rubocop/comment_config.rb#63
def comment_only_line?(line_number); end def comment_only_line?(line_number); end
# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19
def config(*_arg0, **_arg1, &_arg2); end def config(*_arg0, **_arg1, &_arg2); end
# source://rubocop/1.75.1/lib/rubocop/comment_config.rb#51 # source://rubocop/1.75.2/lib/rubocop/comment_config.rb#51
def cop_disabled_line_ranges; end def cop_disabled_line_ranges; end
# source://rubocop/1.75.1/lib/rubocop/comment_config.rb#39 # source://rubocop/1.75.2/lib/rubocop/comment_config.rb#39
def cop_enabled_at_line?(cop, line_number); end def cop_enabled_at_line?(cop, line_number); end
# source://rubocop/1.75.1/lib/rubocop/comment_config.rb#47 # source://rubocop/1.75.2/lib/rubocop/comment_config.rb#47
def cop_opted_in?(cop); end def cop_opted_in?(cop); end
# source://rubocop/1.75.1/lib/rubocop/comment_config.rb#55 # source://rubocop/1.75.2/lib/rubocop/comment_config.rb#55
def extra_enabled_comments; end def extra_enabled_comments; end
# source://rubocop/1.75.1/lib/rubocop/comment_config.rb#30 # source://rubocop/1.75.2/lib/rubocop/comment_config.rb#30
def processed_source; end def processed_source; end
# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19
@ -7534,51 +7534,51 @@ class RuboCop::CommentConfig
private private
# source://rubocop/1.75.1/lib/rubocop/comment_config.rb#96 # source://rubocop/1.75.2/lib/rubocop/comment_config.rb#96
def analyze; end def analyze; end
# source://rubocop/1.75.1/lib/rubocop/comment_config.rb#124 # source://rubocop/1.75.2/lib/rubocop/comment_config.rb#124
def analyze_cop(analysis, directive); end def analyze_cop(analysis, directive); end
# source://rubocop/1.75.1/lib/rubocop/comment_config.rb#144 # source://rubocop/1.75.2/lib/rubocop/comment_config.rb#144
def analyze_disabled(analysis, directive); end def analyze_disabled(analysis, directive); end
# source://rubocop/1.75.1/lib/rubocop/comment_config.rb#155 # source://rubocop/1.75.2/lib/rubocop/comment_config.rb#155
def analyze_rest(analysis, directive); end def analyze_rest(analysis, directive); end
# source://rubocop/1.75.1/lib/rubocop/comment_config.rb#135 # source://rubocop/1.75.2/lib/rubocop/comment_config.rb#135
def analyze_single_line(analysis, directive); end def analyze_single_line(analysis, directive); end
# source://rubocop/1.75.1/lib/rubocop/comment_config.rb#164 # source://rubocop/1.75.2/lib/rubocop/comment_config.rb#164
def cop_line_ranges(analysis); end def cop_line_ranges(analysis); end
# source://rubocop/1.75.1/lib/rubocop/comment_config.rb#170 # source://rubocop/1.75.2/lib/rubocop/comment_config.rb#170
def each_directive; end def each_directive; end
# source://rubocop/1.75.1/lib/rubocop/comment_config.rb#69 # source://rubocop/1.75.2/lib/rubocop/comment_config.rb#69
def extra_enabled_comments_with_names(extras:, names:); end def extra_enabled_comments_with_names(extras:, names:); end
# source://rubocop/1.75.1/lib/rubocop/comment_config.rb#190 # source://rubocop/1.75.2/lib/rubocop/comment_config.rb#190
def handle_enable_all(directive, names, extras); end def handle_enable_all(directive, names, extras); end
# source://rubocop/1.75.1/lib/rubocop/comment_config.rb#204 # source://rubocop/1.75.2/lib/rubocop/comment_config.rb#204
def handle_switch(directive, names, extras); end def handle_switch(directive, names, extras); end
# source://rubocop/1.75.1/lib/rubocop/comment_config.rb#115 # source://rubocop/1.75.2/lib/rubocop/comment_config.rb#115
def inject_disabled_cops_directives(analyses); end def inject_disabled_cops_directives(analyses); end
# source://rubocop/1.75.1/lib/rubocop/comment_config.rb#183 # source://rubocop/1.75.2/lib/rubocop/comment_config.rb#183
def non_comment_token_line_numbers; end def non_comment_token_line_numbers; end
# source://rubocop/1.75.1/lib/rubocop/comment_config.rb#83 # source://rubocop/1.75.2/lib/rubocop/comment_config.rb#83
def opt_in_cops; end def opt_in_cops; end
# source://rubocop/1.75.1/lib/rubocop/comment_config.rb#179 # source://rubocop/1.75.2/lib/rubocop/comment_config.rb#179
def qualified_cop_name(cop_name); end def qualified_cop_name(cop_name); end
end end
class RuboCop::Config class RuboCop::Config
# source://rubocop/1.75.1/lib/rubocop/config.rb#31 # source://rubocop/1.75.2/lib/rubocop/config.rb#31
def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end
# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19
@ -7587,40 +7587,40 @@ class RuboCop::Config
# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19
def []=(*_arg0, **_arg1, &_arg2); end def []=(*_arg0, **_arg1, &_arg2); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#212 # source://rubocop/1.75.2/lib/rubocop/config.rb#212
def active_support_extensions_enabled?; end def active_support_extensions_enabled?; end
# source://rubocop/1.75.1/lib/rubocop/config.rb#127 # source://rubocop/1.75.2/lib/rubocop/config.rb#127
def add_excludes_from_higher_level(highest_config); end def add_excludes_from_higher_level(highest_config); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#239 # source://rubocop/1.75.2/lib/rubocop/config.rb#239
def allowed_camel_case_file?(file); end def allowed_camel_case_file?(file); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#283 # source://rubocop/1.75.2/lib/rubocop/config.rb#283
def base_dir_for_path_parameters; end def base_dir_for_path_parameters; end
# source://rubocop/1.75.1/lib/rubocop/config.rb#313 # source://rubocop/1.75.2/lib/rubocop/config.rb#313
def bundler_lock_file_path; end def bundler_lock_file_path; end
# source://rubocop/1.75.1/lib/rubocop/config.rb#85 # source://rubocop/1.75.2/lib/rubocop/config.rb#85
def check; end def check; end
# source://rubocop/1.75.1/lib/rubocop/config.rb#180 # source://rubocop/1.75.2/lib/rubocop/config.rb#180
def clusivity_config_for_badge?(badge); end def clusivity_config_for_badge?(badge); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#200 # source://rubocop/1.75.2/lib/rubocop/config.rb#200
def cop_enabled?(name); end def cop_enabled?(name); end
# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19
def delete(*_arg0, **_arg1, &_arg2); end def delete(*_arg0, **_arg1, &_arg2); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#139 # source://rubocop/1.75.2/lib/rubocop/config.rb#139
def deprecation_check; end def deprecation_check; end
# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19
def dig(*_arg0, **_arg1, &_arg2); end def dig(*_arg0, **_arg1, &_arg2); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#204 # source://rubocop/1.75.2/lib/rubocop/config.rb#204
def disabled_new_cops?; end def disabled_new_cops?; end
# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19
@ -7629,40 +7629,40 @@ class RuboCop::Config
# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19
def each_key(*_arg0, **_arg1, &_arg2); end def each_key(*_arg0, **_arg1, &_arg2); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#208 # source://rubocop/1.75.2/lib/rubocop/config.rb#208
def enabled_new_cops?; end def enabled_new_cops?; end
# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19
def fetch(*_arg0, **_arg1, &_arg2); end def fetch(*_arg0, **_arg1, &_arg2); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#261 # source://rubocop/1.75.2/lib/rubocop/config.rb#261
def file_to_exclude?(file); end def file_to_exclude?(file); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#220 # source://rubocop/1.75.2/lib/rubocop/config.rb#220
def file_to_include?(file); end def file_to_include?(file); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#196 # source://rubocop/1.75.2/lib/rubocop/config.rb#196
def for_all_cops; end def for_all_cops; end
# source://rubocop/1.75.1/lib/rubocop/config.rb#166 # source://rubocop/1.75.2/lib/rubocop/config.rb#166
def for_badge(badge); end def for_badge(badge); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#153 # source://rubocop/1.75.2/lib/rubocop/config.rb#153
def for_cop(cop); end def for_cop(cop); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#191 # source://rubocop/1.75.2/lib/rubocop/config.rb#191
def for_department(department_name); end def for_department(department_name); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#160 # source://rubocop/1.75.2/lib/rubocop/config.rb#160
def for_enabled_cop(cop); end def for_enabled_cop(cop); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#338 # source://rubocop/1.75.2/lib/rubocop/config.rb#338
def gem_versions_in_target; end def gem_versions_in_target; end
# source://rubocop/1.75.1/lib/rubocop/config.rb#342 # source://rubocop/1.75.2/lib/rubocop/config.rb#342
def inspect; end def inspect; end
# source://rubocop/1.75.1/lib/rubocop/config.rb#110 # source://rubocop/1.75.2/lib/rubocop/config.rb#110
def internal?; end def internal?; end
# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19
@ -7671,16 +7671,16 @@ class RuboCop::Config
# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19
def keys(*_arg0, **_arg1, &_arg2); end def keys(*_arg0, **_arg1, &_arg2); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#81 # source://rubocop/1.75.2/lib/rubocop/config.rb#81
def loaded_features; end def loaded_features; end
# source://rubocop/1.75.1/lib/rubocop/config.rb#21 # source://rubocop/1.75.2/lib/rubocop/config.rb#21
def loaded_path; end def loaded_path; end
# source://rubocop/1.75.1/lib/rubocop/config.rb#77 # source://rubocop/1.75.2/lib/rubocop/config.rb#77
def loaded_plugins; end def loaded_plugins; end
# source://rubocop/1.75.1/lib/rubocop/config.rb#115 # source://rubocop/1.75.2/lib/rubocop/config.rb#115
def make_excludes_absolute; end def make_excludes_absolute; end
# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19
@ -7689,37 +7689,37 @@ class RuboCop::Config
# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19
def merge(*_arg0, **_arg1, &_arg2); end def merge(*_arg0, **_arg1, &_arg2); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#293 # source://rubocop/1.75.2/lib/rubocop/config.rb#293
def parser_engine; end def parser_engine; end
# source://rubocop/1.75.1/lib/rubocop/config.rb#274 # source://rubocop/1.75.2/lib/rubocop/config.rb#274
def path_relative_to_config(path); end def path_relative_to_config(path); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#270 # source://rubocop/1.75.2/lib/rubocop/config.rb#270
def patterns_to_exclude; end def patterns_to_exclude; end
# source://rubocop/1.75.1/lib/rubocop/config.rb#266 # source://rubocop/1.75.2/lib/rubocop/config.rb#266
def patterns_to_include; end def patterns_to_include; end
# source://rubocop/1.75.1/lib/rubocop/config.rb#324 # source://rubocop/1.75.2/lib/rubocop/config.rb#324
def pending_cops; end def pending_cops; end
# source://rubocop/1.75.1/lib/rubocop/config.rb#253 # source://rubocop/1.75.2/lib/rubocop/config.rb#253
def possibly_include_hidden?; end def possibly_include_hidden?; end
# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19
def replace(*_arg0, **_arg1, &_arg2); end def replace(*_arg0, **_arg1, &_arg2); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#105 # source://rubocop/1.75.2/lib/rubocop/config.rb#105
def signature; end def signature; end
# source://rubocop/1.75.1/lib/rubocop/config.rb#308 # source://rubocop/1.75.2/lib/rubocop/config.rb#308
def smart_loaded_path; end def smart_loaded_path; end
# source://rubocop/1.75.1/lib/rubocop/config.rb#216 # source://rubocop/1.75.2/lib/rubocop/config.rb#216
def string_literals_frozen_by_default?; end def string_literals_frozen_by_default?; end
# source://rubocop/1.75.1/lib/rubocop/config.rb#297 # source://rubocop/1.75.2/lib/rubocop/config.rb#297
def target_rails_version; end def target_rails_version; end
# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19
@ -7731,7 +7731,7 @@ class RuboCop::Config
# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19
def to_hash(*_arg0, **_arg1, &_arg2); end def to_hash(*_arg0, **_arg1, &_arg2); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#101 # source://rubocop/1.75.2/lib/rubocop/config.rb#101
def to_s; end def to_s; end
# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19
@ -7740,37 +7740,37 @@ class RuboCop::Config
# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19
def validate(*_arg0, **_arg1, &_arg2); end def validate(*_arg0, **_arg1, &_arg2); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#92 # source://rubocop/1.75.2/lib/rubocop/config.rb#92
def validate_after_resolution; end def validate_after_resolution; end
private private
# source://rubocop/1.75.1/lib/rubocop/config.rb#392 # source://rubocop/1.75.2/lib/rubocop/config.rb#392
def department_of(qualified_cop_name); end def department_of(qualified_cop_name); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#380 # source://rubocop/1.75.2/lib/rubocop/config.rb#380
def enable_cop?(qualified_cop_name, cop_options); end def enable_cop?(qualified_cop_name, cop_options); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#367 # source://rubocop/1.75.2/lib/rubocop/config.rb#367
def gem_version_to_major_minor_float(gem_version); end def gem_version_to_major_minor_float(gem_version); end
# source://rubocop/1.75.1/lib/rubocop/config.rb#373 # source://rubocop/1.75.2/lib/rubocop/config.rb#373
def read_gem_versions_from_target_lockfile; end def read_gem_versions_from_target_lockfile; end
# source://rubocop/1.75.1/lib/rubocop/config.rb#354 # source://rubocop/1.75.2/lib/rubocop/config.rb#354
def read_rails_version_from_bundler_lock_file; end def read_rails_version_from_bundler_lock_file; end
# source://rubocop/1.75.1/lib/rubocop/config.rb#349 # source://rubocop/1.75.2/lib/rubocop/config.rb#349
def target_rails_version_from_bundler_lock_file; end def target_rails_version_from_bundler_lock_file; end
class << self class << self
# source://rubocop/1.75.1/lib/rubocop/config.rb#23 # source://rubocop/1.75.2/lib/rubocop/config.rb#23
def create(hash, path, check: T.unsafe(nil)); end def create(hash, path, check: T.unsafe(nil)); end
end end
end end
class RuboCop::ConfigValidator class RuboCop::ConfigValidator
# source://rubocop/1.75.1/lib/rubocop/config_validator.rb#28 # source://rubocop/1.75.2/lib/rubocop/config_validator.rb#28
def initialize(config); end def initialize(config); end
# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19
@ -7779,66 +7779,66 @@ class RuboCop::ConfigValidator
# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19
def smart_loaded_path(*_arg0, **_arg1, &_arg2); end def smart_loaded_path(*_arg0, **_arg1, &_arg2); end
# source://rubocop/1.75.1/lib/rubocop/config_validator.rb#65 # source://rubocop/1.75.2/lib/rubocop/config_validator.rb#65
def target_ruby_version; end def target_ruby_version; end
# source://rubocop/1.75.1/lib/rubocop/config_validator.rb#34 # source://rubocop/1.75.2/lib/rubocop/config_validator.rb#34
def validate; end def validate; end
# source://rubocop/1.75.1/lib/rubocop/config_validator.rb#61 # source://rubocop/1.75.2/lib/rubocop/config_validator.rb#61
def validate_after_resolution; end def validate_after_resolution; end
private private
# source://rubocop/1.75.1/lib/rubocop/config_validator.rb#100 # source://rubocop/1.75.2/lib/rubocop/config_validator.rb#100
def alert_about_unrecognized_cops(invalid_cop_names); end def alert_about_unrecognized_cops(invalid_cop_names); end
# source://rubocop/1.75.1/lib/rubocop/config_validator.rb#264 # source://rubocop/1.75.2/lib/rubocop/config_validator.rb#264
def check_cop_config_value(hash, parent = T.unsafe(nil)); end def check_cop_config_value(hash, parent = T.unsafe(nil)); end
# source://rubocop/1.75.1/lib/rubocop/config_validator.rb#73 # source://rubocop/1.75.2/lib/rubocop/config_validator.rb#73
def check_obsoletions; end def check_obsoletions; end
# source://rubocop/1.75.1/lib/rubocop/config_validator.rb#80 # source://rubocop/1.75.2/lib/rubocop/config_validator.rb#80
def check_target_ruby; end def check_target_ruby; end
# source://rubocop/1.75.1/lib/rubocop/config_validator.rb#205 # source://rubocop/1.75.2/lib/rubocop/config_validator.rb#205
def each_invalid_parameter(cop_name); end def each_invalid_parameter(cop_name); end
# source://rubocop/1.75.1/lib/rubocop/config_validator.rb#116 # source://rubocop/1.75.2/lib/rubocop/config_validator.rb#116
def list_unknown_cops(invalid_cop_names); end def list_unknown_cops(invalid_cop_names); end
# source://rubocop/1.75.1/lib/rubocop/config_validator.rb#284 # source://rubocop/1.75.2/lib/rubocop/config_validator.rb#284
def param_error_message(parent, key, value, supposed_values); end def param_error_message(parent, key, value, supposed_values); end
# source://rubocop/1.75.1/lib/rubocop/config_validator.rb#252 # source://rubocop/1.75.2/lib/rubocop/config_validator.rb#252
def reject_conflicting_safe_settings; end def reject_conflicting_safe_settings; end
# source://rubocop/1.75.1/lib/rubocop/config_validator.rb#243 # source://rubocop/1.75.2/lib/rubocop/config_validator.rb#243
def reject_mutually_exclusive_defaults; end def reject_mutually_exclusive_defaults; end
# source://rubocop/1.75.1/lib/rubocop/config_validator.rb#139 # source://rubocop/1.75.2/lib/rubocop/config_validator.rb#139
def suggestion(name); end def suggestion(name); end
# source://rubocop/1.75.1/lib/rubocop/config_validator.rb#71 # source://rubocop/1.75.2/lib/rubocop/config_validator.rb#71
def target_ruby; end def target_ruby; end
# source://rubocop/1.75.1/lib/rubocop/config_validator.rb#217 # source://rubocop/1.75.2/lib/rubocop/config_validator.rb#217
def validate_enforced_styles(valid_cop_names); end def validate_enforced_styles(valid_cop_names); end
# source://rubocop/1.75.1/lib/rubocop/config_validator.rb#166 # source://rubocop/1.75.2/lib/rubocop/config_validator.rb#166
def validate_new_cops_parameter; end def validate_new_cops_parameter; end
# source://rubocop/1.75.1/lib/rubocop/config_validator.rb#191 # source://rubocop/1.75.2/lib/rubocop/config_validator.rb#191
def validate_parameter_names(valid_cop_names); end def validate_parameter_names(valid_cop_names); end
# source://rubocop/1.75.1/lib/rubocop/config_validator.rb#177 # source://rubocop/1.75.2/lib/rubocop/config_validator.rb#177
def validate_parameter_shape(valid_cop_names); end def validate_parameter_shape(valid_cop_names); end
# source://rubocop/1.75.1/lib/rubocop/config_validator.rb#237 # source://rubocop/1.75.2/lib/rubocop/config_validator.rb#237
def validate_support_and_has_list(name, formats, valid); end def validate_support_and_has_list(name, formats, valid); end
# source://rubocop/1.75.1/lib/rubocop/config_validator.rb#155 # source://rubocop/1.75.2/lib/rubocop/config_validator.rb#155
def validate_syntax_cop; end def validate_syntax_cop; end
end end

View File

@ -10,7 +10,7 @@ RSpec.describe Homebrew::DevCmd::TapNew do
# To ensure that Utils::Git.setup_gpg! doesn't raise an error # To ensure that Utils::Git.setup_gpg! doesn't raise an error
setup_test_formula "gnupg" setup_test_formula "gnupg"
expect { brew "tap-new", "homebrew/foo", "--verbose" } expect { brew "tap-new", "--no-git", "--verbose", "homebrew/foo" }
.to be_a_success .to be_a_success
.and output(%r{homebrew/foo}).to_stdout .and output(%r{homebrew/foo}).to_stdout
.and not_to_output.to_stderr .and not_to_output.to_stderr

View File

@ -41,7 +41,7 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/benchmark-0.4.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/benchmark-0.4.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/bigdecimal-3.1.9") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/bigdecimal-3.1.9")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/bigdecimal-3.1.9/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/bigdecimal-3.1.9/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/bindata-2.5.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/bindata-2.5.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/coderay-1.1.3/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/coderay-1.1.3/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/diff-lcs-1.6.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/diff-lcs-1.6.1/lib")
@ -77,7 +77,7 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rainbow-3.1.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rainbow-3.1.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/rbs-3.9.2") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/rbs-3.9.2")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rbs-3.9.2/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rbs-3.9.2/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-runtime-0.5.12003/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-runtime-0.5.12010/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rbi-0.3.2/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rbi-0.3.2/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/redcarpet-3.6.1") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/redcarpet-3.6.1")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/redcarpet-3.6.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/redcarpet-3.6.1/lib")
@ -90,7 +90,7 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rspec-retry-0.6.2/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rspec-retry-0.6.2/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rspec-sorbet-1.9.2/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rspec-sorbet-1.9.2/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rspec_junit_formatter-0.6.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rspec_junit_formatter-0.6.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-ast-1.44.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-ast-1.44.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/ruby-progressbar-1.13.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/ruby-progressbar-1.13.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unicode-emoji-4.0.4/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unicode-emoji-4.0.4/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unicode-display_width-3.1.4/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unicode-display_width-3.1.4/lib")
@ -107,9 +107,9 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/simplecov_json_formatter-0.1.4/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/simplecov_json_formatter-0.1.4/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/simplecov-0.22.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/simplecov-0.22.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/simplecov-cobertura-2.1.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/simplecov-cobertura-2.1.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-static-0.5.12003-universal-darwin/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-static-0.5.12010-universal-darwin/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-0.5.12003/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-0.5.12010/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-static-and-runtime-0.5.12003/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-static-and-runtime-0.5.12010/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/thor-1.3.2/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/thor-1.3.2/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/spoom-1.6.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/spoom-1.6.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/stackprof-0.2.27") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/stackprof-0.2.27")

View File

@ -1,3 +0,0 @@
module BinData
VERSION = '2.5.0'
end

View File

@ -1,5 +1,5 @@
# BinData -- Binary data manipulator. # BinData -- Binary data manipulator.
# Copyright (c) 2007 - 2018 Dion Mendel. # Copyright (c) 2007 - 2025 Dion Mendel.
require 'bindata/version' require 'bindata/version'
require 'bindata/array' require 'bindata/array'
@ -35,4 +35,4 @@ require 'bindata/warnings'
# #
# BinData is released under the same license as Ruby. # BinData is released under the same license as Ruby.
# #
# Copyright (c) 2007 - 2018 Dion Mendel. # Copyright (c) 2007 - 2025 Dion Mendel.

View File

@ -456,7 +456,7 @@ module BinData
private private
def create_empty_binary_string def create_empty_binary_string
"".force_encoding(Encoding::BINARY) String.new.force_encoding(Encoding::BINARY)
end end
def chain_seekable? def chain_seekable?

View File

@ -36,14 +36,22 @@ module BinData
end end
def lookup(name, hints = {}) def lookup(name, hints = {})
the_class = @registry[normalize_name(name, hints)] search_names(name, hints).each do |search|
if the_class register_dynamic_class(search)
the_class if @registry.has_key?(search)
elsif @registry[normalize_name(name, hints.merge(endian: :big))] return @registry[search]
raise(UnRegisteredTypeError, "#{name}, do you need to specify endian?") end
else
raise(UnRegisteredTypeError, name)
end end
# give the user a hint if the endian keyword is missing
search_names(name, hints.merge(endian: :big)).each do |search|
register_dynamic_class(search)
if @registry.has_key?(search)
raise(UnRegisteredTypeError, "#{name}, do you need to specify endian?")
end
end
raise(UnRegisteredTypeError, name)
end end
# Convert CamelCase +name+ to underscore style. # Convert CamelCase +name+ to underscore style.
@ -60,27 +68,20 @@ module BinData
#--------------- #---------------
private private
def normalize_name(name, hints) def search_names(name, hints)
name = underscore_name(name) base = underscore_name(name)
searches = []
if !registered?(name) search_prefix = [""] + Array(hints[:search_prefix])
search_prefix = [""] + Array(hints[:search_prefix]) search_prefix.each do |prefix|
search_prefix.each do |prefix| nwp = name_with_prefix(base, prefix)
nwp = name_with_prefix(name, prefix) nwe = name_with_endian(nwp, hints[:endian])
if registered?(nwp)
name = nwp
break
end
nwe = name_with_endian(nwp, hints[:endian]) searches << nwp
if registered?(nwe) searches << nwe if nwe
name = nwe
break
end
end
end end
name searches
end end
def name_with_prefix(name, prefix) def name_with_prefix(name, prefix)
@ -93,7 +94,7 @@ module BinData
end end
def name_with_endian(name, endian) def name_with_endian(name, endian)
return name if endian.nil? return nil if endian.nil?
suffix = (endian == :little) ? 'le' : 'be' suffix = (endian == :little) ? 'le' : 'be'
if /^u?int\d+$/.match?(name) if /^u?int\d+$/.match?(name)
@ -103,17 +104,11 @@ module BinData
end end
end end
def registered?(name)
register_dynamic_class(name) unless @registry.key?(name)
@registry.key?(name)
end
def register_dynamic_class(name) def register_dynamic_class(name)
if /^u?int\d+(le|be)$/.match?(name) || /^s?bit\d+(le)?$/.match?(name) if /^u?int\d+(le|be)$/.match?(name) || /^s?bit\d+(le)?$/.match?(name)
class_name = name.gsub(/(?:^|_)(.)/) { $1.upcase } class_name = name.gsub(/(?:^|_)(.)/) { $1.upcase }
begin begin
# call const_get for side effects # call const_get for side effect of creating class
BinData.const_get(class_name) BinData.const_get(class_name)
rescue NameError rescue NameError
end end
@ -124,7 +119,7 @@ module BinData
prev_class = @registry[name] prev_class = @registry[name]
if prev_class && prev_class != class_to_register if prev_class && prev_class != class_to_register
Kernel.warn "warning: replacing registered class #{prev_class} " \ Kernel.warn "warning: replacing registered class #{prev_class} " \
"with #{class_to_register}" "with #{class_to_register}"
end end
end end
end end

View File

@ -0,0 +1,3 @@
module BinData
VERSION = '2.5.1'
end

Some files were not shown because too many files have changed in this diff Show More