2012-03-29 15:12:59 -07:00
|
|
|
# Provides code to work properly on 1.8 and 1.9
|
|
|
|
|
|
|
|
class String
|
|
|
|
unless method_defined? :bytesize
|
|
|
|
alias_method :bytesize, :size
|
|
|
|
end
|
2012-11-29 12:39:42 -08:00
|
|
|
|
|
|
|
unless method_defined? :byteslice
|
|
|
|
alias_method :byteslice, :[]
|
|
|
|
end
|
2012-03-29 15:12:59 -07:00
|
|
|
end
|