summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-01 09:20:38 (GMT)
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-01 09:20:38 (GMT)
commit7fdb4099cd6889d29fb07f9b41dbd788d1164031 (patch)
treecb8b0a2f23036dbd70e85448ad974589bf24e0f5 /array.c
parent499658abff8c207fb14621eb638de95036a2d723 (diff)
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
Diffstat (limited to 'array.c')
-rw-r--r--array.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/array.c b/array.c
index a2438a3..619a435 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);