Should only check frozen for Array#pop
MODIFY
src/array.c
src/array.c
@@ -451,7 +451,7 @@ mrb_ary_pop(mrb_state *mrb, mrb_value ary)
{
struct RArray *a = mrb_ary_ptr(ary);
- ary_modify(mrb, a);
+ ary_modify_check(mrb, a);
if (a->len == 0) return mrb_nil_value();
return a->ptr[--a->len];
}

MODIFY
test/t/array.rb
test/t/array.rb
@@ -237,6 +237,8 @@ assert('Array#pop', '15.2.12.5.21') do
assert_nil([].pop)
assert_equal([1,2], a)
assert_equal(3, b)
+
+ assert_raise(RuntimeError) { [].freeze.pop }
end
assert('Array#push', '15.2.12.5.22') do

Should only check frozen for Array#pop