# File lib/ruby_lexer.rb, line 637
  def unescape s
    r = ESCAPES[s]

    return r if r

    case s
    when /^[0-7]{1,3}/ then
      $&.to_i(8).chr
    when /^x([0-9a-fA-F]{1,2})/ then
      $1.to_i(16).chr
    when /^M-(.)/ then
      ($1[0].ord | 0x80).chr
    when /^(C-|c)(.)/ then
      ($2[0].ord & 0x9f).chr
    when /^[McCx0-9]/ then
      rb_compile_error("Invalid escape character syntax")
    else
      s
    end
  end