From: Clifford Heath Date: 2008-02-04T19:14:58+09:00 Subject: Re: Parsing JSON (#155) tho_mica_l wrote: >> rule string >> '"' char* '"' { def obj >> eval( >> # This should be handled in the "char" rule. >> text_value.gsub(/\\u..../) { |unicode| >> eval("0x"+unicode[2..-1]).chr >> } >> ) >> end >> } >> end > > I was slightly surprised to find this in a full-blown parser. I think > this shortcut is a really bad choice here since it makes the parse > execute code on input like ["#{`ls -r /`}"]. At least I *admitted* to cheating :-).