https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112009-02-20T20:22:55ZRuby Issue Tracking SystemRuby 1.8 - Backport #1183: Adding support for the new hash literal syntaxhttps://redmine.ruby-lang.org/issues/1183?journal_id=32852009-02-20T20:22:55Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>=begin<br>
Hi,</p>
<p>At Fri, 20 Feb 2009 19:17:10 +0900,<br>
Akinori MUSHA wrote in <a href="/issues/1183">[ruby-core:22286]</a>:</p>
<blockquote>
<p>However, there needs some more work to retain the use of<br>
colon in place of then/do, in order to keep backward<br>
compatibility, although it has been deprecated and dropped in<br>
1.9.</p>
</blockquote>
<p>No such syntax has been defined officially.<br>
No backward compatibility issue.</p>
<p>--<br>
Nobu Nakada</p>
<p>=end</p> Ruby 1.8 - Backport #1183: Adding support for the new hash literal syntaxhttps://redmine.ruby-lang.org/issues/1183?journal_id=32862009-02-20T20:50:08Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul></ul><p>=begin<br>
Nobuyoshi Nakada wrote:</p>
<blockquote>
<p>Hi,</p>
<p>At Fri, 20 Feb 2009 19:17:10 +0900,<br>
Akinori MUSHA wrote in <a href="/issues/1183">[ruby-core:22286]</a>:</p>
<blockquote>
<p>However, there needs some more work to retain the use of<br>
colon in place of then/do, in order to keep backward<br>
compatibility, although it has been deprecated and dropped in<br>
1.9.</p>
</blockquote>
<p>No such syntax has been defined officially.<br>
No backward compatibility issue.</p>
</blockquote>
<p>What do you mean here in "official"? because AFAIK there has been no single<br>
line of official syntax definitions so far.</p>
<p>=end</p> Ruby 1.8 - Backport #1183: Adding support for the new hash literal syntaxhttps://redmine.ruby-lang.org/issues/1183?journal_id=32882009-02-20T21:08:49Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>=begin<br>
Hi,</p>
<p>At Fri, 20 Feb 2009 20:49:35 +0900,<br>
Urabe Shyouhei wrote in <a href="https://blade.ruby-lang.org/ruby-core/22289">[ruby-core:22289]</a>:</p>
<blockquote>
<p>What do you mean here in "official"? because AFAIK there has been no single<br>
line of official syntax definitions so far.</p>
</blockquote>
<p>Matz's book and official tutorial[1] mention about "then" but<br>
not ":". Is there any description about such colons?</p>
<p>[1] <a href="http://www.ruby-doc.org/docs/ProgrammingRuby/html/tut_expressions.html" class="external">http://www.ruby-doc.org/docs/ProgrammingRuby/html/tut_expressions.html</a></p>
<p>--<br>
Nobu Nakada</p>
<p>=end</p> Ruby 1.8 - Backport #1183: Adding support for the new hash literal syntaxhttps://redmine.ruby-lang.org/issues/1183?journal_id=32902009-02-20T23:02:42Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul></ul><p>=begin<br>
Nobuyoshi Nakada wrote:</p>
<blockquote>
<p>Hi,</p>
<p>At Fri, 20 Feb 2009 20:49:35 +0900,<br>
Urabe Shyouhei wrote in <a href="https://blade.ruby-lang.org/ruby-core/22289">[ruby-core:22289]</a>:</p>
<blockquote>
<p>What do you mean here in "official"? because AFAIK there has been no single<br>
line of official syntax definitions so far.</p>
</blockquote>
<p>Matz's book and official tutorial[1] mention about "then" but<br>
not ":". Is there any description about such colons?</p>
</blockquote>
<p>At least O'Reilly's "Programming Language Ruby" has a detailed description<br>
about it. One of a Matz's book no wonder.</p>
<p>=end</p> Ruby 1.8 - Backport #1183: Adding support for the new hash literal syntaxhttps://redmine.ruby-lang.org/issues/1183?journal_id=49162009-07-23T03:49:42Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul><li><strong>File</strong> <a href="/attachments/452">tLABEL.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/452/tLABEL.patch">tLABEL.patch</a> added</li></ul><p>=begin</p>
<p>=end</p> Ruby 1.8 - Backport #1183: Adding support for the new hash literal syntaxhttps://redmine.ruby-lang.org/issues/1183?journal_id=49172009-07-23T03:52:12Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul></ul><p>=begin<br>
太古のメールに返信する上に-devに振るのですが、これできた気がします。test-allと<br>
かが一応通っていそうです。どんなもんでしょうか。</p>
<p>patchはredmineに貼ってあります。</p>
<p>Akinori MUSHA さんは書きました:</p>
<blockquote>
<p>Backport <a class="issue tracker-4 status-5 priority-4 priority-default closed" title="Backport: Adding support for the new hash literal syntax (Closed)" href="https://redmine.ruby-lang.org/issues/1183">#1183</a>: Adding support for the new hash literal syntax<br>
<a href="http://redmine.ruby-lang.org/issues/show/1183" class="external">http://redmine.ruby-lang.org/issues/show/1183</a></p>
<p>Author: Akinori MUSHA<br>
Status: Open, Priority: Normal<br>
Assigned to: Akinori MUSHA, Category: core, Target version: Ruby 1.8.8</p>
<p>Attached is a patch for ruby_1_8 which adds support for the new literal syntax for hash and hash style arguments.</p>
<p>However, there needs some more work to retain the use of colon in place of then/do, in order to keep backward compatibility, although it has been deprecated and dropped in 1.9.</p>
<p>knu@daemon[1]% ruby-1.8.7 -ve 'if true: p(1); end'<br>
ruby 1.8.7 (2008-11-11 patchlevel 73) [x86_64-freebsd7]<br>
1<br>
knu@daemon[1]% ruby-1.8 -ve 'if true: p(1); end'<br>
ruby 1.8.7p5000 (2009-02-19 revision 22433) [x86_64-freebsd7]<br>
-e:1: syntax error, unexpected tLABEL<br>
if true: p(1); end<br>
^<br>
-e:1: syntax error, unexpected kEND, expecting $end</p>
<hr>
<p><a href="http://redmine.ruby-lang.org" class="external">http://redmine.ruby-lang.org</a></p>
</blockquote>
<p>=end</p> Ruby 1.8 - Backport #1183: Adding support for the new hash literal syntaxhttps://redmine.ruby-lang.org/issues/1183?journal_id=50312009-07-31T17:37:10Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>=begin<br>
Applied in changeset r24338.<br>
=end</p> Ruby 1.8 - Backport #1183: Adding support for the new hash literal syntaxhttps://redmine.ruby-lang.org/issues/1183?journal_id=50322009-07-31T18:20:50Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul></ul><p>=begin<br>
Shyouhei Urabe さんは書きました:</p>
<blockquote>
<p>Applied in changeset r24338.</p>
</blockquote>
<p>とりあえずNEWSは書きましたが、テストはどこに突っ込めばいいんでしょうか...</p>
<p>Attachment: signature.asc<br>
=end</p>