summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-24 12:04:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-24 12:04:47 +0000
commit97b8e4996f2aa92fe687415bebd700954af6eab5 (patch)
tree103ebad0dd5a971a1463b668daf9ed9c70527622 /error.c
parentb9c0b5039c77095b36e35dc3227458b09631dd78 (diff)
downloadruby-97b8e4996f2aa92fe687415bebd700954af6eab5.tar.gz
* error.c (rb_invalid_str): prevent intermediate variable from GC.
[ruby-core:34820] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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));
}