ext/numo/narray/gen/tmpl/binary2.c in numo-narray-0.9.0.3 vs ext/numo/narray/gen/tmpl/binary2.c in numo-narray-0.9.0.4

- old
+ new

@@ -42,14 +42,18 @@ @return [Numo::NArray] <%=method%> of self and other. */ static VALUE <%=c_func%>(VALUE self, VALUE other) { + <% if is_object %> + return <%=c_func%>_self(self, other); + <% else %> VALUE klass, v; klass = na_upcast(CLASS_OF(self),CLASS_OF(other)); if (klass==cT) { return <%=c_func%>_self(self, other); } else { v = rb_funcall(klass, id_cast, 1, self); return rb_funcall(v, <%=id_op%>, 1, other); } + <% end %> }