From: Shyouhei Urabe Date: 2011-10-13T22:23:05+09:00 Subject: [ruby-core:40135] [Ruby 1.9 - Bug #5442][Rejected] heredoc inside Hash initialization Issue #5442 has been updated by Shyouhei Urabe. Status changed from Open to Rejected That's identical to Hash[:a, "some text\n" ,:b,'other'] and produces a same error. So it is consistent. Place the comma beforehand. i.e. Hash[:a, <<-EOS, :b, 'other'] some text EOS ---------------------------------------- Bug #5442: heredoc inside Hash initialization http://redmine.ruby-lang.org/issues/5442 Author: Jonatan Hejzlar Status: Rejected Priority: Normal Assignee: Category: Target version: ruby -v: 1.9.2p290 (2011-07-09 revision 32553) Shouldn't this initialization be valid? Hash[:a,<<-EOS some text EOS ,:b,'other'] gives the following error syntax error, unexpected ',', expecting ']' -- http://redmine.ruby-lang.org