Example #1
0
 /** num_div */
 @JRubyMethod(name = "div")
 public IRubyObject div19(ThreadContext context, IRubyObject other) {
   if (other instanceof RubyNumeric) {
     RubyNumeric numeric = (RubyNumeric) other;
     if (numeric.zero_p(context).isTrue()) {
       throw context.runtime.newZeroDivisionError();
     }
   }
   return callMethod(context, "/", other).callMethod(context, "floor");
 }