summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-compiler
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2016-11-02 16:14:20 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2016-11-02 16:14:20 +0900
commitcc3f1b7f5cccd652c4348d28f3e678a9ea3ac520 (patch)
treec5d7da8410ae89cd271b3f6bbb03625d6a9a6adf /mrbgems/mruby-compiler
parent13d0832965a36d2c16a71acf982b7c98c4c37af6 (diff)
downloadmruby-cc3f1b7f5cccd652c4348d28f3e678a9ea3ac520.tar.gz
mruby-cc3f1b7f5cccd652c4348d28f3e678a9ea3ac520.zip
allow single quoted labels in hashes; ref #3231
Diffstat (limited to 'mrbgems/mruby-compiler')
-rw-r--r--mrbgems/mruby-compiler/core/parse.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y
index a00fd0c49..426c262fb 100644
--- a/mrbgems/mruby-compiler/core/parse.y
+++ b/mrbgems/mruby-compiler/core/parse.y
@@ -3241,6 +3241,10 @@ assoc : arg_value tASSOC arg_value
{
$$ = cons(new_sym(p, $1), $2);
}
+ | tLABEL_END arg_value
+ {
+ $$ = cons(new_sym(p, new_strsym(p, $1)), $2);
+ }
| tSTRING_BEG tLABEL_END arg_value
{
$$ = cons(new_sym(p, new_strsym(p, $2)), $3);