From: Eric Hodel Date: 2006-09-30T03:52:37+09:00 Subject: Re: The %? .. ? Operator On Sep 29, 2006, at 9:56 AM, James Edward Gray II wrote: > I'm needing to know the full list of characters that can (or > cannot) be used in the following Ruby construct: > > %?special Ruby String literal? > > What are all the legal choices for the ?s above? > > I did browse parse.y a little, but couldn't find an obvious answer > there. It looks like the rule is something like: /%[QqWwxrs]?(.).*\1/ Where QqWwxrs define what type of special literal it is (string, array, exec (`), regex or symbol) and following that is the terminating character which may be any character (but ([<{ must be balanced). See parse.y around line 4162, "case '%':" -- Eric Hodel - drbrain@segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com