summaryrefslogtreecommitdiff
path: root/enumerator.c
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-29 12:06:42 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-29 12:06:42 +0000
commit075752a83693aad6d9f8c42783b204df6b8bf332 (patch)
tree9cb766c4932e00f5118ad874e7c186a612b1a9f7 /enumerator.c
parent8cb0de91c4b00a0615d1bef672b17154495f0a0f (diff)
Add a frozenness check to Enumerator::Generator#initialize.
* enumerator.c (generator_init): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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) {