diff options
| author | keiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-06 15:11:33 +0000 |
|---|---|---|
| committer | keiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-06 15:11:33 +0000 |
| commit | ebea77307acacf2bf7c271cbe59784a42ff6f826 (patch) | |
| tree | fe04f82030f8de07c7848ea96557310f1972ff12 | |
| parent | 4f6c55dd19e046b567917580b78925885d64e92a (diff) | |
| download | ruby-ebea77307acacf2bf7c271cbe59784a42ff6f826.tar.gz ruby-ebea77307acacf2bf7c271cbe59784a42ff6f826.tar.xz ruby-ebea77307acacf2bf7c271cbe59784a42ff6f826.zip | |
* irb/ruby-lex.rb: support for '\c'. [ruby-talk:263508]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | lib/irb/ruby-lex.rb | 6 |
2 files changed, 10 insertions, 0 deletions
@@ -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. diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index d8442f305..561028fb6 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -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 |
