Merge pull request #19755 from Homebrew/dependabot/bundler/Library/Homebrew/bindata-2.5.1
build(deps): bump bindata from 2.5.0 to 2.5.1 in /Library/Homebrew
This commit is contained in:
commit
9fd5bd1c21
@ -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)
|
||||||
|
|||||||
@ -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
|
||||||
|
|
||||||
@ -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")
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
module BinData
|
|
||||||
VERSION = '2.5.0'
|
|
||||||
end
|
|
||||||
@ -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.
|
||||||
@ -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?
|
||||||
@ -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
|
||||||
3
Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/bindata-2.5.1/lib/bindata/version.rb
vendored
Normal file
3
Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/bindata-2.5.1/lib/bindata/version.rb
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
module BinData
|
||||||
|
VERSION = '2.5.1'
|
||||||
|
end
|
||||||
Loading…
x
Reference in New Issue
Block a user