aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-19 05:10:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-19 05:10:38 +0000
commit8b501f6d7fa6aa85912dc36abccdac8915fe3b22 (patch)
treef8e6165495c7761c9795c4a8e8cdb758564ff603 /parse.y
parent0e7936f89647a8ba2cd664dfde47e6a2e2c94e69 (diff)
downloadruby-8b501f6d7fa6aa85912dc36abccdac8915fe3b22.tar.gz
parse.y: indent at '#'
* parse.y (parser_here_document): update indent at '#', which is not a space. [ruby-core:83368] [Bug #14032] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y6
1 files changed, 6 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index 4e79784203..3f76ed19f7 100644
--- a/parse.y
+++ b/parse.y
@@ -6732,6 +6732,12 @@ parser_here_document(struct parser_params *parser, NODE *here)
newtok();
if (c == '#') {
int t = parser_peek_variable_name(parser);
+ if (heredoc_line_indent != -1) {
+ if (heredoc_indent > heredoc_line_indent) {
+ heredoc_indent = heredoc_line_indent;
+ }
+ heredoc_line_indent = -1;
+ }
if (t) return t;
tokadd('#');
c = nextc();