Remove Set#to_h

This overrides Enumerable#to_h, but doesn't handle a block, breaking
backwards compatibility.

Set#to_h was added in the marshalling support commit, but isn't
necessary for that, as the underlying function is called. Remove
the method definition to restore backwards compatibility.
This commit is contained in:
Jeremy Evans 2025-05-03 00:16:16 -07:00
parent b758b6f204
commit 203199251f
Notes: git 2025-05-13 01:10:10 +00:00

1
set.c
View File

@ -2184,7 +2184,6 @@ Init_Set(void)
rb_define_method(rb_cSet, "superset?", set_i_superset, 1);
rb_define_alias(rb_cSet, ">=", "superset?");
rb_define_method(rb_cSet, "to_a", set_i_to_a, 0);
rb_define_method(rb_cSet, "to_h", set_i_to_h, 0);
rb_define_method(rb_cSet, "to_set", set_i_to_set, -1);
/* :nodoc: */