>>(p1)
public
Shifts fix right count positions (left if count
is negative).
Show source
/*
* call-seq:
* fix >> count => integer
*
* Shifts _fix_ right _count_ positions (left if _count_ is negative).
*/
static VALUE
rb_fix_rshift(x, y)
VALUE x, y;
{
long i, val;
val = FIX2LONG(x);
if (!FIXNUM_P(y))
return rb_big_rshift(rb_int2big(val), y);
i = FIX2LONG(y);
if (i == 0) return x;
if (i < 0)
return fix_lshift(val, (unsigned long)-i);
return fix_rshift(val, i);
}