opal/corelib/marshal/read_buffer.rb
# Reads and returns Bignum from an input stream
#
Reads and returns Bignum from an input stream
Reads and returns Bignum from an input stream
def read_bignum
      sign = read_char == '-' ? -1 : 1
      size = read_fixnum * 2
      result = 0
      (0...size).each do |exp|
        result += read_char.ord * 2**(exp * 8)
      end
      result = result.to_i * sign
      @object_cache << result
      result
    end
def read_bignum sign = read_char == '-' ? - 1 : 1 size = read_fixnum * 2 result = 0 ( 0 ... size ) . each do | exp | result += read_char . ord * 2 ** ( exp * 8 ) end result = result . to_i * sign @object_cache << result result end
Reads and returns Bignum from an input stream
Reads and returns Bignum from an input stream