ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:40134] [Ruby 1.9 - Bug #5442][Open] heredoc inside Hash initialization
@ 2011-10-13 13:06 Jonatan Hejzlar
  2011-10-13 13:23 ` [ruby-core:40135] [Ruby 1.9 - Bug #5442][Rejected] " Shyouhei Urabe
  2011-10-13 13:37 ` [ruby-core:40136] [Ruby 1.9 - Bug #5442] " Jonatan Hejzlar
  0 siblings, 2 replies; 3+ messages in thread
From: Jonatan Hejzlar @ 2011-10-13 13:06 UTC (permalink / raw
  To: ruby-core


Issue #5442 has been reported by Jonatan Hejzlar.

----------------------------------------
Bug #5442: heredoc inside Hash initialization
http://redmine.ruby-lang.org/issues/5442

Author: Jonatan Hejzlar
Status: Open
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:40135] [Ruby 1.9 - Bug #5442][Rejected] heredoc inside Hash initialization
  2011-10-13 13:06 [ruby-core:40134] [Ruby 1.9 - Bug #5442][Open] heredoc inside Hash initialization Jonatan Hejzlar
@ 2011-10-13 13:23 ` Shyouhei Urabe
  2011-10-13 13:37 ` [ruby-core:40136] [Ruby 1.9 - Bug #5442] " Jonatan Hejzlar
  1 sibling, 0 replies; 3+ messages in thread
From: Shyouhei Urabe @ 2011-10-13 13:23 UTC (permalink / raw
  To: ruby-core


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:40136] [Ruby 1.9 - Bug #5442] heredoc inside Hash initialization
  2011-10-13 13:06 [ruby-core:40134] [Ruby 1.9 - Bug #5442][Open] heredoc inside Hash initialization Jonatan Hejzlar
  2011-10-13 13:23 ` [ruby-core:40135] [Ruby 1.9 - Bug #5442][Rejected] " Shyouhei Urabe
@ 2011-10-13 13:37 ` Jonatan Hejzlar
  1 sibling, 0 replies; 3+ messages in thread
From: Jonatan Hejzlar @ 2011-10-13 13:37 UTC (permalink / raw
  To: ruby-core


Issue #5442 has been updated by Jonatan Hejzlar.


I see, thanks
----------------------------------------
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-13 13:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-13 13:06 [ruby-core:40134] [Ruby 1.9 - Bug #5442][Open] heredoc inside Hash initialization Jonatan Hejzlar
2011-10-13 13:23 ` [ruby-core:40135] [Ruby 1.9 - Bug #5442][Rejected] " Shyouhei Urabe
2011-10-13 13:37 ` [ruby-core:40136] [Ruby 1.9 - Bug #5442] " Jonatan Hejzlar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).