From e6883ef68880dc6682ab8bad5c390619e672933f Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 18 Jan 2018 03:29:12 +0000 Subject: parse.y: fix overflow git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/-ext-/ast/test_ast.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/-ext-/ast/test_ast.rb b/test/-ext-/ast/test_ast.rb index d5bdff154a..06bb0bf5e2 100644 --- a/test/-ext-/ast/test_ast.rb +++ b/test/-ext-/ast/test_ast.rb @@ -129,4 +129,12 @@ class TestAst < Test::Unit::TestCase assert_equal([], helper.errors) end end + + def test_column_with_long_heredoc_identifier + term = "A"*257 + ast = AST.parse("<<-#{term}\n""ddddddd\n#{term}\n") + node = ast.children[1] + assert_equal("NODE_STR", node.type) + assert_equal(0, node.first_column) + end end -- cgit v1.2.3