Patches item #6366, was opened at 2006-10-27 15:50 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1700&aid=6366&group_id=426 Category: Ruby1.9 Group: None Status: Open Resolution: None Priority: 3 Submitted By: Dominic Cooney (dcooney) Assigned to: Nobody (None) Summary: Fix for bug 3245 Initial Comment: RubyLex.read_escape doesn't discriminate whether it is lexing a ' or " string. For most escapes the existing code just happens to work; however it always consumes at least one character after \c. This means in '\c', RubyLex misses the end of the string and keeps lexing. This patch makes read_escape only treat \ and \' as escapes when lexing a ' (or %q) string. read_escape arguably should ungetc the \ when the following character isn't \ or ' when lexing a ' or %q string, because a single \ isn't an escape, however I haven't implemented this. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1700&aid=6366&group_id=426