diff options
author | (no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-12-07 16:47:21 +0000 |
---|---|---|
committer | (no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-12-07 16:47:21 +0000 |
commit | b514a325b560d0f36451050e15dd7ff985171d7b (patch) | |
tree | 381b72778e5ed473e47665757e47f66ef7191ce5 /numeric.c | |
parent | be1fea072cd0d22788ef8a931c0c6b64a2503b5d (diff) |
This commit was manufactured by cvs2svn to create tag 'v1_4_3'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_4_3@582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -1169,12 +1169,10 @@ fix_rshift(x, y) long i, val; i = NUM2LONG(y); - if (i < sizeof(long) * 8) { - val = RSHIFT(FIX2LONG(x), i); - return INT2FIX(val); - } - - return INT2FIX(0); + if (i < 0) + return fix_lshift(x, INT2FIX(-i)); + val = RSHIFT(FIX2LONG(x), i); + return INT2FIX(val); } static VALUE |