diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-03-24 13:19:57 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-03-24 13:19:57 +0000 |
commit | 0331e42be396bfb85f4f36009629f4199d074300 (patch) | |
tree | ddb5b09a4dd17cf120f16f6281e27456f68ee469 /parse.y | |
parent | 87108634e10364103928cb96df95fa6b1c6f951d (diff) | |
download | ruby-0331e42be396bfb85f4f36009629f4199d074300.tar.gz |
parse.y: freeze filename
* parse.y (ripper_initialize): filename can not be modified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -11445,9 +11445,11 @@ ripper_initialize(int argc, VALUE *argv, VALUE self) parser->eofp = Qfalse; if (NIL_P(fname)) { fname = STR_NEW2("(ripper)"); + OBJ_FREEZE(fname); } else { StringValue(fname); + fname = rb_str_new_frozen(fname); } parser_initialize(parser); |