Revisions

gist: 219222 Download_button fork
public
Public Clone URL: git://gist.github.com/219222.git
Embed All Files: show embed
asdfasdf #
1
2
3
4
5
6
7
8
9
10
11
12
13
>> require 'bert'
=> true
>> bignum = 10_000_000_000_000_000_000
=> 10000000000000000000
>> bignum.class
=> Bignum
>> BERT.encode(bignum)
=> "\203n\b\000"
>> BERT.decode(BERT.encode(bignum))
=> 12884901888
>> BERT.decode(BERT.encode(bignum)) == bignum
=> false