Sha256: 2c5c378946b6632d3ac9d8054dfcc82373f3f7e111495517f9b41d1715b50d94

Contents?: true

Size: 498 Bytes

Versions: 1

Compression:

Stored size: 498 Bytes

Contents

module Polyfill
  module V2_4
    module String
      module Concat
        module Method
          def concat(*others)
            return super if others.length == 1

            acc = '' << self
            others.each do |other|
              acc << other
            end

            replace(acc)
          end if RUBY_VERSION < '2.4.0'
        end

        if RUBY_VERSION < '2.4.0'
          refine ::String do
            include Method
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
polyfill-0.2.0 lib/polyfill/v2_4/string/concat.rb