diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-26 16:05:27 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-26 16:05:27 +0000 |
commit | 3fbc65d47fe8d446dde8fe77d3b76fb81f8ffba1 (patch) | |
tree | df675922a5fa06a9626e271bb0a2486127bcd0a8 /parse.y | |
parent | de7e116e82dfd4b071200e830fb15840728ebb72 (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.y | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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) { |