From 4a98d5c8fd56119a5e30f8e371fd4aac1866895d Mon Sep 17 00:00:00 2001 From: Yukihiro Matsumoto Date: Thu, 28 Jun 2012 23:35:17 +0900 Subject: allow string interpolation in symbols like :"a=#{15}" --- src/parse.y | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/parse.y') diff --git a/src/parse.y b/src/parse.y index 069a97412..af8b93cfa 100644 --- a/src/parse.y +++ b/src/parse.y @@ -527,13 +527,6 @@ new_strsym(parser_state *p, node* str) return mrb_intern2(p->mrb, s, len); } -// (:sym . a) -static node* -new_dsym(parser_state *p, node *a) -{ - return cons((node*)NODE_DSYM, a); -} - // (:lvar . a) static node* new_lvar(parser_state *p, mrb_sym sym) @@ -705,6 +698,13 @@ new_dstr(parser_state *p, node *a) return cons((node*)NODE_DSTR, a); } +// (:dsym . a) +static node* +new_dsym(parser_state *p, node *a) +{ + return cons((node*)NODE_DSYM, new_dstr(p, a)); +} + // (:backref . n) static node* new_back_ref(parser_state *p, int n) -- cgit v1.2.3