diff options
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1058,6 +1058,9 @@ rb_str2cstr(str, len) str = rb_str_to_str(str); } if (len) *len = RSTRING(str)->len; + else if (ruby_verbose && RSTRING(str)->len != strlen(RSTRING(str)->ptr)) { + rb_warn("string contains \\0 character"); + } return RSTRING(str)->ptr; } |