Class: Fixnum

Inherits:
Object show all
Defined in:
opal/opal/corelib/marshal/write_buffer.rb

Instance Method Summary collapse

Instance Method Details

#__marshal__(buffer) ⇒ Object



18
19
20
21
22
23
24
25
26
# File 'opal/opal/corelib/marshal/write_buffer.rb', line 18

def __marshal__(buffer)
  if self >= -0x40000000 && self < 0x40000000
    buffer.append('i')
    buffer.write_fixnum(self)
  else
    buffer.append('l')
    buffer.write_bignum(self)
  end
end