Sha256: e847634ba08f735183b768f2951f6c9b07e4178c196bb53a77d952ec37939a52
Contents?: true
Size: 391 Bytes
Versions: 36
Compression:
Stored size: 391 Bytes
Contents
# Define the byte-operators on a string if they're not defined (Ruby 1.8) class String alias_method :getbyte, :[] unless method_defined?(:getbyte) alias_method :setbyte, :[]= unless method_defined?(:setbyte) alias_method :bytesize, :size unless method_defined?(:bytesize) end module Enumerable unless method_defined?(:minmax) def minmax [min, max] end end end
Version data entries
36 entries across 34 versions & 6 rubygems