summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'error.c')
-rw-r--r--error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/error.c b/error.c
index 217740f9d9..ca563722ba 100644
--- a/error.c
+++ b/error.c
@@ -970,7 +970,7 @@ nometh_err_args(VALUE self)
void
rb_invalid_str(const char *str, const char *type)
{
- VALUE s = rb_str_inspect(rb_str_new2(str));
+ volatile VALUE s = rb_str_inspect(rb_str_new2(str));
rb_raise(rb_eArgError, "invalid value for %s: %s", type, RSTRING_PTR(s));
}