diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-01 09:20:38 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-01 09:20:38 +0000 |
commit | 7fdb4099cd6889d29fb07f9b41dbd788d1164031 (patch) | |
tree | cb8b0a2f23036dbd70e85448ad974589bf24e0f5 /array.c | |
parent | 499658abff8c207fb14621eb638de95036a2d723 (diff) | |
download | ruby-7fdb4099cd6889d29fb07f9b41dbd788d1164031.tar.gz |
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.c | 16 |
1 files changed, 0 insertions, 16 deletions
@@ -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); |