diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-13 14:03:13 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-13 14:03:13 +0000 |
commit | de79b66f4689ad0b7f845a24092189a418f13ce4 (patch) | |
tree | dc0fcdaef4cbf6e3b1a8e8a21b2f3b500e75642f /test/ruby | |
parent | 0001cf6bdc6d0eb9130bfc162b61c26279339e81 (diff) | |
download | ruby-de79b66f4689ad0b7f845a24092189a418f13ce4.tar.gz |
* bignum.c (big_shift3): New function.
big_lshift and big_rshift are merged.
(big_shift2): New function.
(big_lshift): Use big_shift3.
(big_rshift): Ditto.
(check_shiftdown): Removed.
(rb_big_lshift): Use big_shift2 and big_shift3.
(rb_big_rshift): Ditto.
(big_lshift): Removed.
(big_rshift): Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_bignum.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_bignum.rb b/test/ruby/test_bignum.rb index f0d76c83bf..95c5dd784a 100644 --- a/test/ruby/test_bignum.rb +++ b/test/ruby/test_bignum.rb @@ -533,6 +533,11 @@ class TestBignum < Test::Unit::TestCase assert_equal(-1, -(2**31) >> 32) end + def test_shift_bigshift + big = 2**300 + assert_equal(2**65538 / (2**65537), 2**65538 >> big.coerce(65537).first) + end + def test_aref assert_equal(0, (2**32)[0]) assert_equal(0, (2**32)[2**32]) |