From b907ee320dc58436e0c75519db20f051824cef04 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 20 Oct 2009 05:50:53 +0000 Subject: * parse.y (parser_here_document): dispatch delayed heredoc contents. based on a patch from Andy Keep in [ruby-core:24855]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ripper/dummyparser.rb | 2 +- test/ripper/test_parser_events.rb | 14 ++++++++++++++ test/ripper/test_scanner_events.rb | 10 +++++----- 3 files changed, 20 insertions(+), 6 deletions(-) (limited to 'test/ripper') diff --git a/test/ripper/dummyparser.rb b/test/ripper/dummyparser.rb index cf0b5d2a30..ec8800b17b 100644 --- a/test/ripper/dummyparser.rb +++ b/test/ripper/dummyparser.rb @@ -51,7 +51,7 @@ class DummyParser < Ripper class << self; self; end.class_eval do define_method(name) do |*a, &b| result = super(*a, &b) - yield + yield(*a) result end end diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb index 80199ecce5..2494434d86 100644 --- a/test/ripper/test_parser_events.rb +++ b/test/ripper/test_parser_events.rb @@ -202,6 +202,20 @@ class TestRipper_ParserEvents < Test::Unit::TestCase assert_equal true, thru_bodystmt end + def test_heredoc + bug1921 = '[ruby-core:24855]' + thru_heredoc_beg = false + tree = parse("<