class String

def byteslice(*args)

We can simply slice the string, which is a byte array there.
Ruby 1.8.7 does not have byteslice, but it handles encodings differently anyway.
def byteslice(*args)
  slice(*args)
end