codegen/generate_functions.rb in torch-rb-0.13.0 vs codegen/generate_functions.rb in torch-rb-0.13.1
- old
+ new
@@ -154,13 +154,10 @@
ruby_name = ruby_name.sub(/\Alinalg_/, "") if type == "linalg"
ruby_name = ruby_name.sub(/\Aspecial_/, "") if type == "special"
ruby_name = ruby_name.sub(/\Asparse_/, "") if type == "sparse"
ruby_name = name if name.start_with?("__")
- # cast for Ruby < 3.0 https://github.com/thisMagpie/fftw/issues/22#issuecomment-49508900
- cast = RUBY_VERSION.to_f > 2.7 ? "" : "(VALUE (*)(...)) "
-
- "rb_#{def_method}(m, \"#{ruby_name}\", #{cast}#{full_name(name, type)}, -1);"
+ "rb_#{def_method}(m, \"#{ruby_name}\", #{full_name(name, type)}, -1);"
end
def generate_method_def(name, functions, type, def_method)
assign_self = type == "tensor" ? "\n Tensor& self = Rice::detail::From_Ruby<Tensor&>().convert(self_);" : ""