summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'object.c')
-rw-r--r--object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/object.c b/object.c
index a954d8ad88..dd3ad41664 100644
--- a/object.c
+++ b/object.c
@@ -1116,7 +1116,7 @@ rb_str2cstr(str, len)
{
StringValue(str);
if (len) *len = RSTRING(str)->len;
- else if (ruby_verbose && RSTRING(str)->len != strlen(RSTRING(str)->ptr)) {
+ else if (RTEST(ruby_verbose) && RSTRING(str)->len != strlen(RSTRING(str)->ptr)) {
rb_warn("string contains \\0 character");
}
return RSTRING(str)->ptr;