diff options
| author | keiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-02-28 13:47:48 +0000 |
|---|---|---|
| committer | keiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-02-28 13:47:48 +0000 |
| commit | 2c39740722e1c4996d6429d54de5457c3a177c6d (patch) | |
| tree | 03254f09ffab2771a707b889dc6b00026849cb5f /lib/irb/ruby-lex.rb | |
| parent | 674fd0001faf2877f3b9cc9dd5fc128fb27aaa87 (diff) | |
| download | ruby-2c39740722e1c4996d6429d54de5457c3a177c6d.tar.gz ruby-2c39740722e1c4996d6429d54de5457c3a177c6d.tar.xz ruby-2c39740722e1c4996d6429d54de5457c3a177c6d.zip | |
* lib/irb/ruby-lex.rb: fixed that irb can't parse /\^/. [ruby-dev:28404] and http://rubyforge.org/tracker/index.php?func=detail&aid=3302&group_id=426&atid=1698
* lib/irb/ruby-lex.rb: support "\s" in irb.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb/ruby-lex.rb')
| -rw-r--r-- | lib/irb/ruby-lex.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index 8068d1c8b..c9b9f1039 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -309,7 +309,7 @@ class RubyLex "q" => "\'", "Q" => "\"", "x" => "\`", - "r" => "\/", + "r" => "/", "w" => "]", "W" => "]", "s" => ":" @@ -326,14 +326,14 @@ class RubyLex "\'" => TkSTRING, "\"" => TkSTRING, "\`" => TkXSTRING, - "\/" => TkREGEXP, + "/" => TkREGEXP, "]" => TkDSTRING, ":" => TkSYMBOL } DLtype2Token = { "\"" => TkDSTRING, "\`" => TkDXSTRING, - "\/" => TkDREGEXP, + "/" => TkDREGEXP, } def lex_init() @@ -1087,7 +1087,7 @@ class RubyLex def read_escape case ch = getc when "\n", "\r", "\f" - when "\\", "n", "t", "r", "f", "v", "a", "e", "b" #" + when "\\", "n", "t", "r", "f", "v", "a", "e", "b", "s" #" when /[0-7]/ ungetc ch 3.times do @@ -1122,7 +1122,7 @@ class RubyLex end end - when "C", "c", "^" + when "C", "c" #, "^" if ch == "C" and (ch = getc) != "-" ungetc elsif (ch = getc) == "\\" #" |
