Sha256: b45196a7431f4c0a3ef9d19a3b1f68a220384dbcc077b332f09cb993968cb805

Contents?: true

Size: 459 Bytes

Versions: 2

Compression:

Stored size: 459 Bytes

Contents

module Gitrb
  module Util
    if RUBY_VERSION > '1.9'
      def self.read_bytes_until(io, char)
        str = ''
        while ((ch = io.getc) != char) && !io.eof
          str << ch
        end
        str
      end
    else
      def self.read_bytes_until(io, char)
        str = ''
        while ((ch = io.getc.chr) != char) && !io.eof
          str << ch
        end
        str
      end
    end

    def self.ord(s, i)
      s[i].ord
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gitrb-0.0.5 lib/gitrb/util.rb
gitrb-0.0.4 lib/gitrb/util.rb