Sha256: 2ddcb92f4877abdc5b5af148e17cc3143c6cc941d0681da3aabd7477434b6d06

Contents?: true

Size: 616 Bytes

Versions: 41

Compression:

Stored size: 616 Bytes

Contents

# frozen_string_literal: true

class Array
  NOT_SET = Object.new # :nodoc:
  def to_s(format = NOT_SET) # :nodoc:
    case format
    when :db
      ActiveSupport::Deprecation.warn(
        "Array#to_s(#{format.inspect}) is deprecated. Please use Array#to_fs(#{format.inspect}) instead."
      )
      if empty?
        "null"
      else
        collect(&:id).join(",")
      end
    when NOT_SET
      to_default_s
    else
      ActiveSupport::Deprecation.warn(
        "Array#to_s(#{format.inspect}) is deprecated. Please use Array#to_fs(#{format.inspect}) instead."
      )
      to_default_s
    end
  end
end

Version data entries

41 entries across 38 versions & 9 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8.7/lib/active_support/core_ext/array/deprecated_conversions.rb
activesupport-7.0.8.7 lib/active_support/core_ext/array/deprecated_conversions.rb
activesupport-7.0.8.6 lib/active_support/core_ext/array/deprecated_conversions.rb
activesupport-7.0.8.5 lib/active_support/core_ext/array/deprecated_conversions.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.8.4/lib/active_support/core_ext/array/deprecated_conversions.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.5.1/lib/active_support/core_ext/array/deprecated_conversions.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.5.1/lib/active_support/core_ext/array/deprecated_conversions.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.5.1/lib/active_support/core_ext/array/deprecated_conversions.rb
activesupport-7.0.8.4 lib/active_support/core_ext/array/deprecated_conversions.rb
activesupport-7.0.8.1 lib/active_support/core_ext/array/deprecated_conversions.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activesupport-7.0.2.3/lib/active_support/core_ext/array/deprecated_conversions.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/core_ext/array/deprecated_conversions.rb
activesupport-7.0.8 lib/active_support/core_ext/array/deprecated_conversions.rb
activesupport-7.0.7.2 lib/active_support/core_ext/array/deprecated_conversions.rb
activesupport-7.0.7.1 lib/active_support/core_ext/array/deprecated_conversions.rb
activesupport-7.0.7 lib/active_support/core_ext/array/deprecated_conversions.rb
mlh-rubocop-config-1.0.2 vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.6/lib/active_support/core_ext/array/deprecated_conversions.rb
fablicop-1.10.3 vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.6/lib/active_support/core_ext/array/deprecated_conversions.rb
fablicop-1.10.3 vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.5/lib/active_support/core_ext/array/deprecated_conversions.rb
activesupport-7.0.6 lib/active_support/core_ext/array/deprecated_conversions.rb