diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-09 17:17:05 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-09 17:17:05 +0000 |
| commit | f21cc5ef34e1de0305d63ea70452cc119db13d50 (patch) | |
| tree | aa451b6129cf2194adcc12c40db79d82edadd737 /lib | |
| parent | 3cc0976f7ab0025943f64e554819a902236bb830 (diff) | |
* lib/irb/ruby-lex.rb: support for '\c'. [ruby-talk:263508]
backported from trunk. [ruby-talk:307631]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@17979 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 313a809ccd..4849b9378e 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 |
