Method: Fixnum#shr_with_hornetseye

Defined in:
lib/multiarray.rb

#shr_with_hornetseye(other) ⇒ Object

>> is modified to work with this library

Parameters:

  • other (Object)

    Second operand for binary shr operation.

Returns:

  • (Object)

    Result of binary operation.



468
469
470
471
472
473
474
475
# File 'lib/multiarray.rb', line 468

def shr_with_hornetseye( other )
  if other.is_a? Integer
    shr_without_hornetseye other
  else
    x, y = other.coerce self
    x >> y
  end
end