summaryrefslogtreecommitdiffstats
path: root/iseq.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-07 08:21:01 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-07 08:21:01 +0000
commit6d34bf2b506d5c81f529a828857b9322608d28c6 (patch)
treeb893e83c87cf62a34807a0d67d21d063093235a1 /iseq.c
parentebdd83920b6b97103c93325dbdae13aa32018f78 (diff)
downloadruby-6d34bf2b506d5c81f529a828857b9322608d28c6.tar.gz
ruby-6d34bf2b506d5c81f529a828857b9322608d28c6.tar.xz
ruby-6d34bf2b506d5c81f529a828857b9322608d28c6.zip
* iseq.c (prepare_iseq_build): freeze filename and name string.
* variable.c: freeze class name string. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/iseq.c b/iseq.c
index e8c75d562..f8a7e8a54 100644
--- a/iseq.c
+++ b/iseq.c
@@ -109,9 +109,12 @@ prepare_iseq_build(rb_iseq_t *iseq,
{
rb_thread_t *th = GET_THREAD();
+ OBJ_FREEZE(name);
+ OBJ_FREEZE(filename);
+
iseq->name = name;
- iseq->defined_method_id = 0;
iseq->filename = filename;
+ iseq->defined_method_id = 0;
iseq->iseq_mark_ary = rb_ary_new();
RBASIC(iseq->iseq_mark_ary)->klass = 0;