# File lib/grit/git-ruby/object.rb, line 164
  def self.read_bytes_until(io, char)
    string = ''
    if RUBY_VERSION > '1.9'
      while ((next_char = io.getc) != char) && !io.eof
        string += next_char
      end
    else
      while ((next_char = io.getc.chr) != char) && !io.eof
        string += next_char
      end
    end
    string
  end