summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-26 16:05:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-26 16:05:27 +0000
commit3fbc65d47fe8d446dde8fe77d3b76fb81f8ffba1 (patch)
treedf675922a5fa06a9626e271bb0a2486127bcd0a8 /parse.y
parentde7e116e82dfd4b071200e830fb15840728ebb72 (diff)
* parse.y (rb_check_id): make the given name a symbol or a string.
based on the second patch by Jeremy Evans at [ruby-core:38447] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 315723287f..eb5f7fa5e6 100644
--- a/parse.y
+++ b/parse.y
@@ -10105,10 +10105,11 @@ rb_is_junk_id(ID id)
}
ID
-rb_check_id(VALUE name)
+rb_check_id(volatile VALUE *namep)
{
st_data_t id;
VALUE tmp;
+ VALUE name = *namep;
if (SYMBOL_P(name)) {
return SYM2ID(name);
@@ -10121,6 +10122,7 @@ rb_check_id(VALUE name)
RSTRING_PTR(tmp));
}
name = tmp;
+ *namep = name;
}
if (rb_enc_str_coderange(name) == ENC_CODERANGE_BROKEN) {