* irb/ruby-lex.rb: support for '\c'. [ruby-talk:263508]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
keiju 2007-08-06 15:11:33 +00:00
parent f4a3bcbff0
commit 5956c7ab3e
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,7 @@
Tue Aug 7 00:05:38 2007 Keiju Ishitsuka <keiju@ruby-lang.org>
* irb/ruby-lex.rb: support for '\c'. [ruby-talk:263508]
Mon Aug 6 20:29:22 2007 Koichi Sasada <ko1@atdot.net>
* insnhelper.ci, insns.def: move some statements to functions.

View File

@ -1054,6 +1054,12 @@ class RubyLex
break
elsif @ltype != "'" && @ltype != "]" && @ltype != ":" and ch == "#"
subtype = true
elsif ch == '\\' and @ltype == "'" #'
case ch = getc
when "\\", "\n", "'"
else
ungetc
end
elsif ch == '\\' #'
read_escape
end