diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-18 01:25:08 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-18 01:25:08 +0000 |
commit | 9d2589318966a65ab42f9ebd71bd4d83579ca65e (patch) | |
tree | 98c6e3701df7347a9985c0c08d1e9c29181b14f9 /lib | |
parent | a7fc3f2837abb167bef16dac18fcc0b2c6519ddf (diff) | |
download | ruby-9d2589318966a65ab42f9ebd71bd4d83579ca65e.tar.gz |
* lib/irb/ruby-lex.rb: fixed parse error for striped heredocument syntax.
[fix GH-1127] Patch by @koic
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/irb/ruby-lex.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index b1138cd77d..879c45c565 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -406,7 +406,7 @@ class RubyLex if @lex_state != EXPR_END && @lex_state != EXPR_CLASS && (@lex_state != EXPR_ARG || @space_seen) c = peek(0) - if /\S/ =~ c && (/["'`]/ =~ c || /\w/ =~ c || c == "-") + if /\S/ =~ c && (/["'`]/ =~ c || /\w/ =~ c || c == "-" || c == "~") tk = identify_here_document end end @@ -855,7 +855,7 @@ class RubyLex def identify_here_document ch = getc - if ch == "-" + if ch == "-" || ch == "~" ch = getc indent = true end |