diff options
Diffstat (limited to 'ext/strscan/strscan.c')
-rw-r--r-- | ext/strscan/strscan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c index fd61b544b3..167b5f8933 100644 --- a/ext/strscan/strscan.c +++ b/ext/strscan/strscan.c @@ -1032,7 +1032,8 @@ strscan_aref(VALUE self, VALUE idx) switch (TYPE(idx)) { case T_SYMBOL: - name = rb_id2name(SYM2ID(idx)); + idx = rb_sym2str(idx); + name = RSTRING_PTR(idx); goto name_to_backref; break; case T_STRING: |