Sha256: 7b0004ffc7dc6bc0378f945605ff8f8e9715a03114df64df1f12db94ee49d5bc

Contents?: true

Size: 326 Bytes

Versions: 49

Compression:

Stored size: 326 Bytes

Contents

# Provides code to work properly on 1.8 and 1.9

class String
  unless method_defined? :bytesize
    alias_method :bytesize, :size
  end

  unless method_defined? :byteslice
    def byteslice(*arg)
      enc = self.encoding
      self.dup.force_encoding(Encoding::ASCII_8BIT).slice(*arg).force_encoding(enc)
    end
  end
end

Version data entries

49 entries across 47 versions & 5 rubygems

Version Path
piesync-puma-3.12.6.1 lib/puma/compat.rb
piesync-puma-3.12.6 lib/puma/compat.rb
puma-3.12.6-java lib/puma/compat.rb
puma-3.12.6 lib/puma/compat.rb
puma-3.12.5-java lib/puma/compat.rb
puma-3.12.5 lib/puma/compat.rb
puma-3.12.4-java lib/puma/compat.rb
puma-3.12.4 lib/puma/compat.rb
puma-3.12.2-java lib/puma/compat.rb
puma-3.12.2 lib/puma/compat.rb
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/puma-3.12.1/lib/puma/compat.rb
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/puma-3.12.1/lib/puma/compat.rb
puma-3.12.1-java lib/puma/compat.rb
puma-3.12.1 lib/puma/compat.rb
puma-3.12.0-java lib/puma/compat.rb
puma-3.12.0 lib/puma/compat.rb
puma-3.11.4-java lib/puma/compat.rb
puma-3.11.4 lib/puma/compat.rb
tdiary-5.0.8 vendor/bundle/gems/puma-3.11.3/lib/puma/compat.rb
puma-3.11.3-java lib/puma/compat.rb