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

- old
+ new

@@ -38,14 +38,18 @@ @return [Numo::Bit] result of self <%=method%> 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_<%=method%>, 1, other); } + <% end %> }