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