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 | 3e5b0fcead2d21c727ff5779edc4d25ab84b48c6 (patch) | |
| tree | 10d8ceb3eed3fc1946701e631ccf16102d777c1c /object.c | |
| parent | 2d528523f4c7bacb1a92d1dff8fa830d2e9a031e (diff) | |
| download | ruby-3e5b0fcead2d21c727ff5779edc4d25ab84b48c6.tar.gz ruby-3e5b0fcead2d21c727ff5779edc4d25ab84b48c6.tar.xz ruby-3e5b0fcead2d21c727ff5779edc4d25ab84b48c6.zip | |
* 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: http://svn.ruby-lang.org/repos/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); } |
