aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 860653b43f..4511a64e15 100644
--- a/parse.y
+++ b/parse.y
@@ -8528,7 +8528,9 @@ rb_intern(const char *name)
ID
rb_intern_str(VALUE str)
{
- return rb_intern3(RSTRING_PTR(str), RSTRING_LEN(str), rb_enc_get(str));
+ ID id = rb_intern3(RSTRING_PTR(str), RSTRING_LEN(str), rb_enc_get(str));
+ RB_GC_GUARD(str);
+ return id;
}
VALUE