ext/numo/narray/gen/tmpl/init_class.c in numo-narray-0.9.2.0 vs ext/numo/narray/gen/tmpl/init_class.c in numo-narray-0.9.2.1
- old
+ new
@@ -12,9 +12,10 @@
hCast = rb_hash_new();
rb_define_const(cT, "UPCAST", hCast);
rb_hash_aset(hCast, rb_cArray, cT);
<% for x in upcast %>
<%= x %><% end %>
+ rb_obj_freeze(hCast);
<% @children.each do |m| %>
<%= m.init_def %><% end %>
rb_define_singleton_method(cT, "[]", <%=find("cast").c_func%>, -2);