summaryrefslogtreecommitdiff
path: root/vm_eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-11 08:38:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-11 08:38:27 +0000
commit9cf11364817c58b0a8801e458ee2ee1d0d040789 (patch)
tree9668bac891ad1f9bc73a70cee4d9a41aa3db2c6a /vm_eval.c
parent66a138c2d93df91e93edce6162505ab6e5393226 (diff)
vm_eval.c: skip internal names
* vm_eval.c (local_var_list_add): skip internal local variable name by its type but not if it has a name. internal local variable names are just unique per frame, not globally. [ruby-core:71437] [Bug #11674] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_eval.c')
-rw-r--r--vm_eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_eval.c b/vm_eval.c
index 55d7381..ed44c29 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -2066,7 +2066,7 @@ local_var_list_update(st_data_t *key, st_data_t *value, st_data_t arg, int exist
static void
local_var_list_add(const struct local_var_list *vars, ID lid)
{
- if (lid && rb_id2str(lid)) {
+ if (lid && rb_is_local_id(lid)) {
/* should skip temporary variable */
st_table *tbl = RHASH_TBL_RAW(vars->tbl);
st_data_t idx = 0; /* tbl->num_entries */