diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-16 09:26:38 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-16 09:26:38 +0000 |
commit | be458259da8b3e2623e426fd3354690e01da7a90 (patch) | |
tree | 10d8ceb3eed3fc1946701e631ccf16102d777c1c /object.c | |
parent | 7389bac70795aebdf532c13126f411d140c86045 (diff) |
* eval.c (rb_call0): reorganize "return" event post.
* object.c (str_to_id): warn for NUL containing strings.
* re.c (make_regexp): need to free internal regexp structure when
compilation fails. [ruby-talk:133228]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1643,6 +1643,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)) { + warn("Symbols should not contain NUL (\\0)"); + } return rb_intern(RSTRING(str)->ptr); } |