Sha256: d335b2163186fd34b719ab8c09d9186308808df678c57c0461d2dfcd44d6c183

Contents?: true

Size: 1005 Bytes

Versions: 22

Compression:

Stored size: 1005 Bytes

Contents

module TZInfo

  # Methods to support different versions of Ruby.
  #
  # @private
  module RubyCoreSupport #:nodoc:
    class << self
      # Object#untaint is deprecated and becomes a no-op in Ruby >= 2.7. It has
      # been removed from Ruby 3.2.
      if !Object.new.respond_to?(:untaint) || RUBY_VERSION =~ /\A(\d+)\.(\d+)(?:\.|\z)/ && ($1 == '2' && $2.to_i >= 7 || $1.to_i >= 3)
        # :nocov_functional_untaint:

        # Returns the supplied `Object`
        #
        # @param o [Object] the `Object` to untaint.
        # @return [Object] `o`.
        def untaint(o)
          o
        end

        # :nocov_functional_untaint:
      else
        # :nocov_no_functional_untaint:

        # Untaints and returns the supplied `Object`.
        #
        # @param o [Object] the `Object` to untaint.
        # @return [Object] `o`.
        def untaint(o)
          o.untaint
        end

        # :nocov_no_functional_untaint:
      end
    end
  end
  private_constant :RubyCoreSupport
end

Version data entries

22 entries across 21 versions & 15 rubygems

Version Path
tailscale_middleware-0.0.3 vendor/cache/ruby/3.4.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb
fluent-plugin-nuopenlineage-light-0.1.0 vendor/bundle/ruby/3.3.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb
fluent-plugin-openlineage-light-0.1.4 vendor/bundle/ruby/3.3.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb
fluent-plugin-openlineage-light-0.1.3 vendor/bundle/ruby/3.3.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb
fluent-plugin-openlineage-0.1.0 vendor/bundle/ruby/3.3.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb
katalyst-govuk-formbuilder-1.9.2 vendor/bundle/ruby/3.3.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb
mlh-rubocop-config-1.0.3 vendor/bundle/ruby/3.2.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb
mlh-rubocop-config-1.0.2 vendor/bundle/ruby/3.2.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb
fablicop-1.10.3 vendor/bundle/ruby/3.2.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb
fablicop-1.10.2 vendor/bundle/ruby/3.2.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb