diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-11 16:40:41 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-11 16:40:41 +0000 |
commit | 2fee22f30dae1d2998f293d0b0ec2b368ceb34d6 (patch) | |
tree | 7722d8df63ab0b0e5a6635706ec651c92dd5fc1a /bignum.c | |
parent | 09e6766d1acbc36c6227896af348d8d21ea2a1b2 (diff) | |
download | bundler-2fee22f30dae1d2998f293d0b0ec2b368ceb34d6.tar.gz |
[DOC]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -6999,6 +6999,13 @@ rb_big_size(VALUE big) * (2**10000).bit_length #=> 10001 * (2**10000+1).bit_length #=> 10001 * + * This method can be used to detect overflow in Array#pack as follows. + * + * if n.bit_length < 32 + * [n].pack("l") # no overflow + * else + * raise "overflow" + * end */ static VALUE |