From 7fdb4099cd6889d29fb07f9b41dbd788d1164031 Mon Sep 17 00:00:00 2001 From: normal Date: Thu, 1 Feb 2018 09:20:38 +0000 Subject: array.c: remove rb_ary_frozen_p / Array#frozen? This is redundant since r15206 / ffe425ecaaa2a3f813e1d540e20e2179bce44302 as we no longer lock the array during sort. Instead, fall back to Object#frozen? git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- array.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/array.c b/array.c index a2438a3206..619a435d13 100644 --- a/array.c +++ b/array.c @@ -412,21 +412,6 @@ rb_ary_freeze(VALUE ary) return rb_obj_freeze(ary); } -/* - * call-seq: - * ary.frozen? -> true or false - * - * Return +true+ if this array is frozen (or temporarily frozen - * while being sorted). See also Object#frozen? - */ - -static VALUE -rb_ary_frozen_p(VALUE ary) -{ - if (OBJ_FROZEN(ary)) return Qtrue; - return Qfalse; -} - /* This can be used to take a snapshot of an array (with e.g. rb_ary_replace) and check later whether the array has been modified from the snapshot. The snapshot is cheap, though if @@ -6243,7 +6228,6 @@ Init_Array(void) rb_define_method(rb_cArray, "to_a", rb_ary_to_a, 0); rb_define_method(rb_cArray, "to_h", rb_ary_to_h, 0); rb_define_method(rb_cArray, "to_ary", rb_ary_to_ary_m, 0); - rb_define_method(rb_cArray, "frozen?", rb_ary_frozen_p, 0); rb_define_method(rb_cArray, "==", rb_ary_equal, 1); rb_define_method(rb_cArray, "eql?", rb_ary_eql, 1); -- cgit v1.2.3