From 203199251f723d02f23f5782523d16f91277ea82 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Sat, 3 May 2025 00:16:16 -0700 Subject: [PATCH] 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. --- set.c | 1 - 1 file changed, 1 deletion(-) diff --git a/set.c b/set.c index 6fb04d8788..b08b295753 100644 --- a/set.c +++ b/set.c @@ -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: */