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 54cbdc4..aa96185 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -1178,6 +1178,7 @@ generator_init(VALUE obj, VALUE proc)
{
struct generator *ptr;
+ rb_check_frozen(obj);
TypedData_Get_Struct(obj, struct generator, &generator_data_type, ptr);
if (!ptr) {