123456789_123456789_123456789_123456789_123456789_

Class: String

Relationships & Source Files
Inherits: Object
Defined in: lib/puma/compat.rb

Overview

Provides code to work properly on 1.8 and 1.9

Instance Method Summary

Instance Method Details

#bytesize

[ GitHub ]

  
# File 'lib/puma/compat.rb', line 5

alias_method :bytesize, :size

#byteslice(*arg)

[ GitHub ]

  
# File 'lib/puma/compat.rb', line 9

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