"\c?" should be equal to "\x7f" -------------------------------
Key: JRUBY-6051 URL: https://jira.codehaus.org/browse/JRUBY-6051 Project: JRuby Issue Type: Bug Components: Parser Reporter: Yusuke Endoh Assignee: Thomas E Enebo $ bin/jruby --1.9 -e 'p "\c?", "\c?" == "\x7f"' "w" false $ ruby -e 'p "\c?", "\c?" == "\x7f"' "\u007F" true diff --git a/src/org/jruby/lexer/yacc/RubyYaccLexer.java b/src/org/jruby/lexer/yacc/RubyYaccLexer.java index 71bf9b5..e305cd3 100644 --- a/src/org/jruby/lexer/yacc/RubyYaccLexer.java +++ b/src/org/jruby/lexer/yacc/RubyYaccLexer.java @@ -2533,7 +2533,7 @@ public class RubyYaccLexer { if ((c = src.read()) == '\\') { c = readEscape(); } else if (c == '?') { - return '\u0177'; + return '\177'; } else if (c == EOF) { throw new SyntaxException(PID.INVALID_ESCAPE_SYNTAX, getPosition(), getCurrentLine(), "Invalid escape character syntax"); -- Yusuke Endoh <m...@tsg.ne.jp> -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email