aboutsummaryrefslogtreecommitdiffstats
path: root/iseq.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-11-14 22:10:08 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-11-15 17:52:40 +0900
commitad72d96fcc8c164c6a9e11d138f01b02661b9ab2 (patch)
treebba11f021091dc110dee9a1f9cf8afa8beae26c9 /iseq.c
parent7998dcdedc7f1d3cfaabfc3f68ca7635f0e5e1d1 (diff)
downloadruby-ad72d96fcc8c164c6a9e11d138f01b02661b9ab2.tar.gz
Escape and quote non-local variable names
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/iseq.c b/iseq.c
index 0b58b51b48..bc292859f3 100644
--- a/iseq.c
+++ b/iseq.c
@@ -2071,7 +2071,7 @@ local_var_name(const rb_iseq_t *diseq, VALUE level, VALUE op)
if (!name) {
name = rb_str_new_cstr("?");
}
- else if (!rb_str_symname_p(name)) {
+ else if (!rb_is_local_id(lid)) {
name = rb_str_inspect(name);
}
else {