repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/array/access.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/array/access.rb | # frozen_string_literal: true
class Array
# Returns the tail of the array from +position+.
#
# %w( a b c d ).from(0) # => ["a", "b", "c", "d"]
# %w( a b c d ).from(2) # => ["c", "d"]
# %w( a b c d ).from(10) # => []
# %w().from(0) # => []
# %w( a b c d ).from(-2) # => ["c", "d"]
#... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/array/prepend_and_append.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/array/prepend_and_append.rb | # frozen_string_literal: true
class Array
# The human way of thinking about adding stuff to the end of a list is with append.
alias_method :append, :push unless [].respond_to?(:append)
# The human way of thinking about adding stuff to the beginning of a list is with prepend.
alias_method :prepend, :unshift u... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/array/wrap.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/array/wrap.rb | # frozen_string_literal: true
class Array
# Wraps its argument in an array unless it is already an array (or array-like).
#
# Specifically:
#
# * If the argument is +nil+ an empty array is returned.
# * Otherwise, if the argument responds to +to_ary+ it is invoked, and its result returned.
# * Otherwise,... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/class/subclasses.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/class/subclasses.rb | # frozen_string_literal: true
class Class
begin
# Test if this Ruby supports each_object against singleton_class
ObjectSpace.each_object(Numeric.singleton_class) {}
# Returns an array with all classes that are < than its receiver.
#
# class C; end
# C.descendants # => []
#
# cl... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/class/attribute.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/class/attribute.rb | # frozen_string_literal: true
require "active_support/core_ext/kernel/singleton_class"
require "active_support/core_ext/module/redefine_method"
require "active_support/core_ext/array/extract_options"
class Class
# Declare a class-level attribute whose value is inheritable by subclasses.
# Subclasses can change th... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/class/attribute_accessors.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/class/attribute_accessors.rb | # frozen_string_literal: true
# cattr_* became mattr_* aliases in 7dfbd91b0780fbd6a1dd9bfbc176e10894871d2d,
# but we keep this around for libraries that directly require it knowing they
# want cattr_*. No need to deprecate.
require "active_support/core_ext/module/attribute_accessors"
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/redefine_method.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/redefine_method.rb | # frozen_string_literal: true
class Module
if RUBY_VERSION >= "2.3"
# Marks the named method as intended to be redefined, if it exists.
# Suppresses the Ruby method redefinition warning. Prefer
# #redefine_method where possible.
def silence_redefinition_of_method(method)
if method_defined?(meth... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/anonymous.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/anonymous.rb | # frozen_string_literal: true
class Module
# A module may or may not have a name.
#
# module M; end
# M.name # => "M"
#
# m = Module.new
# m.name # => nil
#
# +anonymous?+ method returns true if module does not have a name, false otherwise:
#
# Module.new.anonymous? # => true
#
# ... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/deprecation.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/deprecation.rb | # frozen_string_literal: true
class Module
# deprecate :foo
# deprecate bar: 'message'
# deprecate :foo, :bar, baz: 'warning!', qux: 'gone!'
#
# You can also use custom deprecator instance:
#
# deprecate :foo, deprecator: MyLib::Deprecator.new
# deprecate :foo, bar: "warning!", deprecator: My... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/concerning.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/concerning.rb | # frozen_string_literal: true
require "active_support/concern"
class Module
# = Bite-sized separation of concerns
#
# We often find ourselves with a medium-sized chunk of behavior that we'd
# like to extract, but only mix in to a single class.
#
# Extracting a plain old Ruby object to encapsulate it and c... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/remove_method.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/remove_method.rb | # frozen_string_literal: true
require "active_support/core_ext/module/redefine_method"
class Module
# Removes the named method, if it exists.
def remove_possible_method(method)
if method_defined?(method) || private_method_defined?(method)
undef_method(method)
end
end
# Removes the named singlet... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/reachable.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/reachable.rb | # frozen_string_literal: true
require "active_support/core_ext/module/anonymous"
require "active_support/core_ext/string/inflections"
class Module
def reachable? #:nodoc:
!anonymous? && name.safe_constantize.equal?(self)
end
deprecate :reachable?
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/attribute_accessors.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/attribute_accessors.rb | # frozen_string_literal: true
require "active_support/core_ext/array/extract_options"
require "active_support/core_ext/regexp"
# Extends the module object with class/module and instance accessors for
# class/module attributes, just like the native attr* accessors for instance
# attributes.
class Module
# Defines a ... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb | # frozen_string_literal: true
require "active_support/core_ext/array/extract_options"
require "active_support/core_ext/regexp"
# Extends the module object with class/module and instance accessors for
# class/module attributes, just like the native attr* accessors for instance
# attributes, but does so on a per-thread... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/introspection.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/introspection.rb | # frozen_string_literal: true
require "active_support/inflector"
class Module
# Returns the name of the module containing this one.
#
# M::N.parent_name # => "M"
def parent_name
if defined?(@parent_name)
@parent_name
else
parent_name = name =~ /::[^:]+\Z/ ? $`.freeze : nil
@parent_... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/delegation.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/delegation.rb | # frozen_string_literal: true
require "set"
require "active_support/core_ext/regexp"
class Module
# Error generated by +delegate+ when a method is called on +nil+ and +allow_nil+
# option is not used.
class DelegationError < NoMethodError; end
RUBY_RESERVED_KEYWORDS = %w(alias and BEGIN begin break case clas... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/aliasing.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/aliasing.rb | # frozen_string_literal: true
class Module
# Allows you to make aliases for attributes, which includes
# getter, setter, and a predicate.
#
# class Content < ActiveRecord::Base
# # has a title attribute
# end
#
# class Email < Content
# alias_attribute :subject, :title
# end
#
#... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/attr_internal.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/module/attr_internal.rb | # frozen_string_literal: true
class Module
# Declares an attribute reader backed by an internally-named instance variable.
def attr_internal_reader(*attrs)
attrs.each { |attr_name| attr_internal_define(attr_name, :reader) }
end
# Declares an attribute writer backed by an internally-named instance variable... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/date_time/blank.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/date_time/blank.rb | # frozen_string_literal: true
require "date"
class DateTime #:nodoc:
# No DateTime is ever blank:
#
# DateTime.now.blank? # => false
#
# @return [false]
def blank?
false
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/date_time/conversions.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/date_time/conversions.rb | # frozen_string_literal: true
require "date"
require "active_support/inflector/methods"
require "active_support/core_ext/time/conversions"
require "active_support/core_ext/date_time/calculations"
require "active_support/values/time_zone"
class DateTime
# Convert to a formatted string. See Time::DATE_FORMATS for pre... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/date_time/acts_like.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/date_time/acts_like.rb | # frozen_string_literal: true
require "date"
require "active_support/core_ext/object/acts_like"
class DateTime
# Duck-types as a Date-like class. See Object#acts_like?.
def acts_like_date?
true
end
# Duck-types as a Time-like class. See Object#acts_like?.
def acts_like_time?
true
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/date_time/compatibility.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/date_time/compatibility.rb | # frozen_string_literal: true
require "active_support/core_ext/date_and_time/compatibility"
require "active_support/core_ext/module/redefine_method"
class DateTime
include DateAndTime::Compatibility
silence_redefinition_of_method :to_time
# Either return an instance of +Time+ with the same UTC offset
# as +... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/date_time/calculations.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/date_time/calculations.rb | # frozen_string_literal: true
require "date"
class DateTime
class << self
# Returns <tt>Time.zone.now.to_datetime</tt> when <tt>Time.zone</tt> or
# <tt>config.time_zone</tt> are set, otherwise returns
# <tt>Time.now.to_datetime</tt>.
def current
::Time.zone ? ::Time.zone.now.to_datetime : ::Ti... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/big_decimal/conversions.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/big_decimal/conversions.rb | # frozen_string_literal: true
require "bigdecimal"
require "bigdecimal/util"
module ActiveSupport
module BigDecimalWithDefaultFormat #:nodoc:
def to_s(format = "F")
super(format)
end
end
end
BigDecimal.prepend(ActiveSupport::BigDecimalWithDefaultFormat)
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/numeric/inquiry.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/numeric/inquiry.rb | # frozen_string_literal: true
unless 1.respond_to?(:positive?) # TODO: Remove this file when we drop support to ruby < 2.3
class Numeric
# Returns true if the number is positive.
#
# 1.positive? # => true
# 0.positive? # => false
# -1.positive? # => false
def positive?
self > 0
... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/numeric/time.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/numeric/time.rb | # frozen_string_literal: true
require "active_support/duration"
require "active_support/core_ext/time/calculations"
require "active_support/core_ext/time/acts_like"
require "active_support/core_ext/date/calculations"
require "active_support/core_ext/date/acts_like"
class Numeric
# Returns a Duration instance matchi... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/numeric/conversions.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/numeric/conversions.rb | # frozen_string_literal: true
require "active_support/core_ext/big_decimal/conversions"
require "active_support/number_helper"
require "active_support/core_ext/module/deprecation"
module ActiveSupport::NumericWithFormat
# Provides options for converting numbers into formatted strings.
# Options are provided for p... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/numeric/bytes.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/core_ext/numeric/bytes.rb | # frozen_string_literal: true
class Numeric
KILOBYTE = 1024
MEGABYTE = KILOBYTE * 1024
GIGABYTE = MEGABYTE * 1024
TERABYTE = GIGABYTE * 1024
PETABYTE = TERABYTE * 1024
EXABYTE = PETABYTE * 1024
# Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes
#
# 2.bytes # =>... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/deprecation/proxy_wrappers.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/deprecation/proxy_wrappers.rb | # frozen_string_literal: true
require "active_support/core_ext/regexp"
module ActiveSupport
class Deprecation
class DeprecationProxy #:nodoc:
def self.new(*args, &block)
object = args.first
return object unless object
super
end
instance_methods.each { |m| undef_method... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/deprecation/method_wrappers.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/deprecation/method_wrappers.rb | # frozen_string_literal: true
require "active_support/core_ext/module/aliasing"
require "active_support/core_ext/array/extract_options"
module ActiveSupport
class Deprecation
module MethodWrapper
# Declare that a method has been deprecated.
#
# class Fred
# def aaa; end
# ... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/deprecation/constant_accessor.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/deprecation/constant_accessor.rb | # frozen_string_literal: true
module ActiveSupport
class Deprecation
# DeprecatedConstantAccessor transforms a constant into a deprecated one by
# hooking +const_missing+.
#
# It takes the names of an old (deprecated) constant and of a new constant
# (both in string form) and optionally a depreca... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/deprecation/reporting.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/deprecation/reporting.rb | # frozen_string_literal: true
require "rbconfig"
module ActiveSupport
class Deprecation
module Reporting
# Whether to print a message (silent mode)
attr_accessor :silenced
# Name of gem where method is deprecated
attr_accessor :gem_name
# Outputs a deprecation warning to the outpu... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/deprecation/instance_delegator.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/deprecation/instance_delegator.rb | # frozen_string_literal: true
require "active_support/core_ext/kernel/singleton_class"
require "active_support/core_ext/module/delegation"
module ActiveSupport
class Deprecation
module InstanceDelegator # :nodoc:
def self.included(base)
base.extend(ClassMethods)
base.singleton_class.prepen... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/deprecation/behaviors.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/deprecation/behaviors.rb | # frozen_string_literal: true
require "active_support/notifications"
module ActiveSupport
# Raised when <tt>ActiveSupport::Deprecation::Behavior#behavior</tt> is set with <tt>:raise</tt>.
# You would set <tt>:raise</tt>, as a behavior to raise errors and proactively report exceptions from deprecations.
class De... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/notifications/fanout.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/notifications/fanout.rb | # frozen_string_literal: true
require "mutex_m"
require "concurrent/map"
module ActiveSupport
module Notifications
# This is a default queue implementation that ships with Notifications.
# It just pushes events to all registered log subscribers.
#
# This class is thread safe. All methods are reentra... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/notifications/instrumenter.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/notifications/instrumenter.rb | # frozen_string_literal: true
require "securerandom"
module ActiveSupport
module Notifications
# Instrumenters are stored in a thread local.
class Instrumenter
attr_reader :id
def initialize(notifier)
@id = unique_id
@notifier = notifier
end
# Instrument the g... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/xml_mini/libxmlsax.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/xml_mini/libxmlsax.rb | # frozen_string_literal: true
require "libxml"
require "active_support/core_ext/object/blank"
require "stringio"
module ActiveSupport
module XmlMini_LibXMLSAX #:nodoc:
extend self
# Class that will build the hash while the XML document
# is being parsed using SAX events.
class HashBuilder
inc... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/xml_mini/libxml.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/xml_mini/libxml.rb | # frozen_string_literal: true
require "libxml"
require "active_support/core_ext/object/blank"
require "stringio"
module ActiveSupport
module XmlMini_LibXML #:nodoc:
extend self
# Parse an XML Document string or IO into a simple hash using libxml.
# data::
# XML Document string or IO to parse
... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/xml_mini/nokogiri.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/xml_mini/nokogiri.rb | # frozen_string_literal: true
begin
require "nokogiri"
rescue LoadError => e
$stderr.puts "You don't have nokogiri installed in your application. Please add it to your Gemfile and run bundle install"
raise e
end
require "active_support/core_ext/object/blank"
require "stringio"
module ActiveSupport
module XmlM... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/xml_mini/rexml.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/xml_mini/rexml.rb | # frozen_string_literal: true
require "active_support/core_ext/kernel/reporting"
require "active_support/core_ext/object/blank"
require "stringio"
module ActiveSupport
module XmlMini_REXML #:nodoc:
extend self
CONTENT_KEY = "__content__".freeze
# Parse an XML Document string or IO into a simple hash.
... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/xml_mini/jdom.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/xml_mini/jdom.rb | # frozen_string_literal: true
raise "JRuby is required to use the JDOM backend for XmlMini" unless RUBY_PLATFORM.include?("java")
require "jruby"
include Java
require "active_support/core_ext/object/blank"
java_import javax.xml.parsers.DocumentBuilder unless defined? DocumentBuilder
java_import javax.xml.parsers.Do... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/xml_mini/nokogirisax.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/xml_mini/nokogirisax.rb | # frozen_string_literal: true
begin
require "nokogiri"
rescue LoadError => e
$stderr.puts "You don't have nokogiri installed in your application. Please add it to your Gemfile and run bundle install"
raise e
end
require "active_support/core_ext/object/blank"
require "stringio"
module ActiveSupport
module XmlM... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/values/time_zone.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/activesupport-5.2.2/lib/active_support/values/time_zone.rb | # frozen_string_literal: true
require "tzinfo"
require "concurrent/map"
require "active_support/core_ext/object/blank"
module ActiveSupport
# The TimeZone class serves as a wrapper around TZInfo::Timezone instances.
# It allows us to do the following:
#
# * Limit the set of zones provided by TZInfo to a meani... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports.rb | require "backports/version"
require "backports/2.4"
require "backports/rails"
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools.rb | # Methods used internally by the backports.
require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/std_lib.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/std_lib.rb | # Will intercept future and past 'require' calls of std_lib
# and load additionally the updated libraries.
require 'backports/tools/std_lib'
require 'backports/tools/alias_method_chain'
module Kernel
def require_with_backports(lib)
begin
return false unless require_without_backports(lib)
paths = Back... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/basic_object.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/basic_object.rb | # Note: Must be required explicitely!
# This is a best attempt to fake BasicObject in Ruby 1.8.x
# What you do get:
# * as few methods as the real BasicObject (at the moment the library is required...)
# * BasicObject === <anything> # ==> returns true
# What you don't get:
# * BasicObject is not in the ancestor list... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/path.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/path.rb | require 'backports/tools/alias_method_chain'
require 'backports/tools/arguments'
module Backports
# Metaprogramming utility to convert the first file argument to path
def self.convert_first_argument_to_path(klass, selector)
mod = class << klass; self; end
unless mod.method_defined? selector
warn "#{m... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/io.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/io.rb | require 'backports/tools/arguments'
module Backports
# Used internally to combine {IO|File} options hash into mode (String or Integer)
def self.combine_mode_and_option(mode = nil, options = Backports::Undefined)
# Can't backport autoclose, {internal|external|}encoding
mode, options = nil, mode if mode.respo... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/suppress_verbose_warnings.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/suppress_verbose_warnings.rb | module Backports
def self.suppress_verbose_warnings
before = $VERBOSE
$VERBOSE = false if $VERBOSE # Set to false (default warning) but not nil (no warnings)
yield
ensure
$VERBOSE = before
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/alias_method_chain.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/alias_method_chain.rb | module Backports
# Modified to avoid polluting Module if so desired
# (from Rails)
def self.alias_method_chain(mod, target, feature)
mod.class_eval do
# Strip out punctuation on predicates or bang methods since
# e.g. target?_without_feature is not a valid method name.
aliased_target, punctu... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/std_lib.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/std_lib.rb | module Backports
module StdLib
class LoadedFeatures
if RUBY_VERSION >= "1.9"
# Full paths are recorded in $LOADED_FEATURES.
@@our_loads = {}
# Check loaded features for one that matches "#{any of the load path}/#{feature}"
def include?(feature)
return true if @@our_... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/arguments.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/arguments.rb | module Backports
# Helper method to coerce a value into a specific class.
# Raises a TypeError if the coercion fails or the returned value
# is not of the right class.
# (from Rubinius)
def self.coerce_to(obj, cls, meth)
return obj if obj.kind_of?(cls)
begin
ret = obj.__send__(meth)
rescue ... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/extreme_object.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/extreme_object.rb | module Backports
MOST_EXTREME_OBJECT_EVER = Object.new # :nodoc:
class << MOST_EXTREME_OBJECT_EVER
def <(whatever)
true
end
def >(whatever)
true
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/normalize.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/normalize.rb | # coding: utf-8
# frozen_string_literal: false
# Copied from CRuby.
# Copyright Ayumu Nojima (野島 歩) and Martin J. Dürst (duerst@it.aoyama.ac.jp)
module UnicodeNormalize
accents = "" \
"[\u0300-\u034E\u0350-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7" \
"\u0610-\u061A\u064B-\u065F\u0... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | true |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/require_relative_dir.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/require_relative_dir.rb | module Backports
def self.require_relative_dir
dir = caller.first.split(/\.rb:\d/,2).first
short_path = dir[/.*(backports\/.*)/, 1] << '/'
Dir.entries(dir).
map{|f| Regexp.last_match(1) if /^(.*)\.rb$/ =~ f}.
compact.
sort.
each do |f|
require short_path + f
... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/alias_method.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/alias_method.rb | module Backports
# Safe alias_method that will only alias if the source exists and destination doesn't
def self.alias_method(mod, new_name, old_name)
mod.instance_eval do
alias_method new_name, old_name
end if mod.method_defined?(old_name) && !mod.method_defined?(new_name)
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/make_block_optional.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/make_block_optional.rb | require 'backports/tools/alias_method_chain'
module Backports
# Metaprogramming utility to make block optional.
# Tests first if block is already optional when given options
def self.make_block_optional(mod, *methods)
mod = class << mod; self; end unless mod.is_a? Module
options = methods.last.is_a?(Hash... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/float_integer_conversion.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/tools/float_integer_conversion.rb | module Backports
class << self
def float_to_integer(float)
map_via_packing(float, 'D', 'q')
end
def integer_to_float(int)
map_via_packing(int, 'q', 'D')
end
private
def map_via_packing(nb, pack, unpack)
result, = [nb.abs].pack(pack).unpack(unpack)
nb < 0 ? -result : r... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.4.0/nil_class.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.4.0/nil_class.rb | require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.4.0/true_class.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.4.0/true_class.rb | require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.4.0/comparable.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.4.0/comparable.rb | require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.4.0/float.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.4.0/float.rb | require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.4.0/fixnum.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.4.0/fixnum.rb | require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.4.0/string.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.4.0/string.rb | require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.4.0/false_class.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.4.0/false_class.rb | require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.4.0/enumerable.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.4.0/enumerable.rb | require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.4.0/regexp.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.4.0/regexp.rb | require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.4.0/hash.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.4.0/hash.rb | require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.4.0/string/match.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.4.0/string/match.rb | unless String.method_defined? :match?
class String
def match?(*args)
!match(*args).nil?
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.5.0/struct.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.5.0/struct.rb | require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.5.0/array.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.5.0/array.rb | require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.5.0/kernel.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.5.0/kernel.rb | require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.5.0/dir.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.5.0/dir.rb | require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.5.0/string.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.5.0/string.rb | require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.5.0/enumerable.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.5.0/enumerable.rb | require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.5.0/integer.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.5.0/integer.rb | require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.5.0/module.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.5.0/module.rb | require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.5.0/hash.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.5.0/hash.rb | require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.5.0/string/delete_suffix.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.5.0/string/delete_suffix.rb | unless String.method_defined? :delete_suffix
require 'backports/tools/arguments'
class String
def delete_suffix(suffix)
suffix = Backports.coerce_to_str(suffix)
len = suffix.length
if len > 0 && index(suffix, -len)
self[0...-len]
else
dup
end
end
end
end
unl... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.5.0/string/delete_prefix.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/backports-3.11.4/lib/backports/2.5.0/string/delete_prefix.rb | unless String.method_defined? :delete_prefix
require 'backports/tools/arguments'
class String
def delete_prefix(prefix)
prefix = Backports.coerce_to_str(prefix)
if rindex(prefix, 0)
self[prefix.length..-1]
else
dup
end
end
end
end
unless String.method_defined? :de... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n.rb | # frozen_string_literal: true
require 'concurrent/map'
require 'i18n/version'
require 'i18n/exceptions'
require 'i18n/interpolate/ruby'
module I18n
autoload :Backend, 'i18n/backend'
autoload :Config, 'i18n/config'
autoload :Gettext, 'i18n/gettext'
autoload :Locale, 'i18n/locale'
autoload :Tests, 'i18n/... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/version.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/version.rb | # frozen_string_literal: true
module I18n
VERSION = "1.5.3"
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/exceptions.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/exceptions.rb | # frozen_string_literal: true
require 'cgi'
module I18n
class ExceptionHandler
def call(exception, _locale, _key, _options)
if exception.is_a?(MissingTranslation)
exception.message
else
raise exception
end
end
end
class ArgumentError < ::ArgumentError; end
class Inv... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/middleware.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/middleware.rb | # frozen_string_literal: true
module I18n
class Middleware
def initialize(app)
@app = app
end
def call(env)
@app.call(env)
ensure
Thread.current[:i18n_config] = I18n::Config.new
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/gettext.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/gettext.rb | # frozen_string_literal: true
module I18n
module Gettext
PLURAL_SEPARATOR = "\001"
CONTEXT_SEPARATOR = "\004"
autoload :Helpers, 'i18n/gettext/helpers'
@@plural_keys = { :en => [:one, :other] }
class << self
# returns an array of plural keys for the given locale or the whole hash
... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/backend.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/backend.rb | # frozen_string_literal: true
module I18n
module Backend
autoload :Base, 'i18n/backend/base'
autoload :InterpolationCompiler, 'i18n/backend/interpolation_compiler'
autoload :Cache, 'i18n/backend/cache'
autoload :CacheFile, 'i18n/backend/cache_file'
aut... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/locale.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/locale.rb | # frozen_string_literal: true
module I18n
module Locale
autoload :Fallbacks, 'i18n/locale/fallbacks'
autoload :Tag, 'i18n/locale/tag'
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/config.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/config.rb | # frozen_string_literal: true
require 'set'
module I18n
class Config
# The only configuration value that is not global and scoped to thread is :locale.
# It defaults to the default_locale.
def locale
defined?(@locale) && @locale ? @locale : default_locale
end
# Sets the current locale pse... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/interpolate/ruby.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/interpolate/ruby.rb | # heavily based on Masao Mutoh's gettext String interpolation extension
# http://github.com/mutoh/gettext/blob/f6566738b981fe0952548c421042ad1e0cdfb31e/lib/gettext/core_ext/string.rb
module I18n
DEFAULT_INTERPOLATION_PATTERNS = [
/%%/,
/%\{(\w+)\}/, # matches placeholders like "... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/core_ext/hash.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/core_ext/hash.rb | module I18n
module HashRefinements
refine Hash do
using I18n::HashRefinements
def except(*keys)
dup.except!(*keys)
end
def except!(*keys)
keys.each { |key| delete(key) }
self
end
def deep_symbolize_keys
each_with_object({}) do |(key, value), re... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/backend/memoize.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/backend/memoize.rb | # frozen_string_literal: true
# Memoize module simply memoizes the values returned by lookup using
# a flat hash and can tremendously speed up the lookup process in a backend.
#
# To enable it you can simply include the Memoize module to your backend:
#
# I18n::Backend::Simple.include(I18n::Backend::Memoize)
#
# Not... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/backend/pluralization.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/backend/pluralization.rb | # frozen_string_literal: true
# I18n Pluralization are useful when you want your application to
# customize pluralization rules.
#
# To enable locale specific pluralizations you can simply include the
# Pluralization module to the Simple backend - or whatever other backend you
# are using.
#
# I18n::Backend::Simple.... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/backend/cascade.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/backend/cascade.rb | # frozen_string_literal: true
# The Cascade module adds the ability to do cascading lookups to backends that
# are compatible to the Simple backend.
#
# By cascading lookups we mean that for any key that can not be found the
# Cascade module strips one segment off the scope part of the key and then
# tries to look up ... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/backend/chain.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/backend/chain.rb | # frozen_string_literal: true
module I18n
module Backend
# Backend that chains multiple other backends and checks each of them when
# a translation needs to be looked up. This is useful when you want to use
# standard translations with a Simple backend but store custom application
# translations in a... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/backend/transliterator.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/backend/transliterator.rb | # encoding: utf-8
# frozen_string_literal: true
module I18n
module Backend
module Transliterator
DEFAULT_REPLACEMENT_CHAR = "?"
# Given a locale and a UTF-8 string, return the locale's ASCII
# approximation for the string.
def transliterate(locale, string, replacement = nil)
@tra... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/backend/cache_file.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/backend/cache_file.rb | # frozen_string_literal: true
require 'digest/sha2'
module I18n
module Backend
# Overwrites the Base load_file method to cache loaded file contents.
module CacheFile
# Optionally provide path_roots array to normalize filename paths,
# to make the cached i18n data portable across environments.
... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/backend/key_value.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/backend/key_value.rb | # frozen_string_literal: true
require 'i18n/backend/base'
module I18n
begin
require 'oj'
class JSON
class << self
def encode(value)
Oj::Rails.encode(value)
end
def decode(value)
Oj.load(value)
end
end
end
rescue LoadError
require 'ac... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/backend/base.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/backend/base.rb | # frozen_string_literal: true
require 'yaml'
require 'json'
require 'i18n/core_ext/hash'
module I18n
module Backend
module Base
using I18n::HashRefinements
include I18n::Backend::Transliterator
# Accepts a list of paths to translation files. Loads translations from
# plain Ruby (*.rb), ... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/backend/gettext.rb | Library/Homebrew/vendor/bundle-standalone/ruby/2.3.0/gems/i18n-1.5.3/lib/i18n/backend/gettext.rb | # frozen_string_literal: true
require 'i18n/gettext'
require 'i18n/gettext/po_parser'
module I18n
module Backend
# Experimental support for using Gettext po files to store translations.
#
# To use this you can simply include the module to the Simple backend - or
# whatever other backend you are usin... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.