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 | 5956c7ab3ec70bc798b6843e0fb17e22424d5083 (patch) | |
tree | fe04f82030f8de07c7848ea96557310f1972ff12 /lib | |
parent | f4a3bcbff05afe3062784af3de4005cd95aac0d8 (diff) |
* 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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/irb/ruby-lex.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index d8442f305b..561028fb6c 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 |