diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-16 09:25:45 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-16 09:25:45 +0000 |
commit | feda16cbd48c1c60b304218e41985cd378382190 (patch) | |
tree | b27fc8161f4f1f52fd4c0b453861b60c452d259b /object.c | |
parent | 4007644d8378c85c0e90ddd9d29e90e3713546af (diff) | |
download | ruby-feda16cbd48c1c60b304218e41985cd378382190.tar.gz |
* eval.c (rb_call0): reorganize "return" event post.
* eval.c (return_jump): no need to post "return" event here.
* object.c (str_to_id): raise ArgumentError for NUL containing
strings.
* parse.y (primary): wrong var node was set for NODE_LAMBDA.
[ruby-core:04555]
* re.c (make_regexp): need to free internal regexp structure when
compilation fails. [ruby-talk:133228]
* parse.y (bv_decl): remove initialize rule from block local
variable declaration.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1567,6 +1567,9 @@ str_to_id(str) if (!RSTRING(str)->ptr || RSTRING(str)->len == 0) { rb_raise(rb_eArgError, "empty symbol string"); } + if (RSTRING(str)->len != strlen(RSTRING(str)->ptr)) { + rb_raise(rb_eArgError, "Symbols should not contain NUL (\\0)"); + } return rb_intern(RSTRING(str)->ptr); } |