summaryrefslogtreecommitdiff
path: root/enumerator.c
diff options
context:
space:
mode:
Diffstat (limited to 'enumerator.c')
-rw-r--r--enumerator.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/enumerator.c b/enumerator.c
index 662056d5a50..54cbdc482b6 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -270,6 +270,7 @@ enumerator_init(VALUE enum_obj, VALUE obj, VALUE meth, int argc, VALUE *argv, rb
{
struct enumerator *ptr;
+ rb_check_frozen(enum_obj);
TypedData_Get_Struct(enum_obj, struct enumerator, &enumerator_data_type, ptr);
if (!ptr) {