aboutsummaryrefslogtreecommitdiffstats
path: root/ext/strscan
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-03 01:56:16 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-03 01:56:16 +0000
commit27c4fb3361d0e731d2deff6093ebd33b69231323 (patch)
tree367d35fbab506ca4838d9157560d2090828271f5 /ext/strscan
parent1d670ab0f090c0232e2a7a619b70ebb559453331 (diff)
downloadruby-27c4fb3361d0e731d2deff6093ebd33b69231323.tar.gz
ext: get rid of inadvertent ID creation
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/strscan')
-rw-r--r--ext/strscan/strscan.c3
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: