https://bugs.ruby-lang.org/
https://bugs.ruby-lang.org/favicon.ico?1711330511
2013-04-17T00:33:38Z
Ruby Issue Tracking System
Ruby master - Bug #8279: Single-line rescue parsing
https://bugs.ruby-lang.org/issues/8279?journal_id=38624
2013-04-17T00:33:38Z
nobu (Nobuyoshi Nakada)
nobu@ruby-lang.org
<ul><li><strong>Priority</strong> changed from <i>5</i> to <i>Normal</i></li></ul>
Ruby master - Bug #8279: Single-line rescue parsing
https://bugs.ruby-lang.org/issues/8279?journal_id=80511
2019-08-09T03:12:04Z
jeremyevans0 (Jeremy Evans)
merch-redmine@jeremyevans.net
<ul><li><strong>File</strong> <a href="/attachments/7980">massign-rescue-modifier-8279.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/7980/massign-rescue-modifier-8279.patch">massign-rescue-modifier-8279.patch</a> added</li></ul><p>This bug is still present in the master branch. Attached is a patch that fixes it, so that multiple assignment with rescue modifier is consistent with single assignment with rescue modifier. After the patch:</p>
<pre><code>a = raise rescue 1 # a = (raise rescue 1)
a, b = raise rescue [1, 2] # a, b = (raise rescue [1, 2])
</code></pre>
Ruby master - Bug #8279: Single-line rescue parsing
https://bugs.ruby-lang.org/issues/8279?journal_id=80512
2019-08-09T05:57:47Z
nobu (Nobuyoshi Nakada)
nobu@ruby-lang.org
<ul></ul><p>Thank you, it seems fine. I've missed this at all.</p>
Ruby master - Bug #8279: Single-line rescue parsing
https://bugs.ruby-lang.org/issues/8279?journal_id=80526
2019-08-09T16:28:02Z
jeremyevans (Jeremy Evans)
code@jeremyevans.net
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>Applied in changeset <a class="changeset" title="Fix parsing of mutiple assignment with rescue modifier Single assignment with rescue modifier ap..." href="https://bugs.ruby-lang.org/projects/ruby-master/repository/git/revisions/53b3be5d58a9bf1efce229b3dce723f96e820c79">git|53b3be5d58a9bf1efce229b3dce723f96e820c79</a>.</p>
<hr>
<p>Fix parsing of mutiple assignment with rescue modifier</p>
<p>Single assignment with rescue modifier applies rescue to the RHS:</p>
<p>a = raise rescue 1 # a = (raise rescue 1)</p>
<p>Previously, multiple assignment with rescue modifier applied rescue<br>
to the entire expression:</p>
<p>a, b = raise rescue [1, 2] # (a, b = raise) rescue [1, 2]</p>
<p>This makes multiple assignment with rescue modifier consistent with<br>
single assignment with rescue modifier, applying rescue to the RHS:</p>
<p>a, b = raise rescue [1, 2] # a, b = (raise rescue [1, 2])</p>
<p>Implements [Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Inline rescue bug (Closed)" href="https://bugs.ruby-lang.org/issues/8239">#8239</a>]<br>
Fixes [Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Single-line rescue parsing (Closed)" href="https://bugs.ruby-lang.org/issues/8279">#8279</a>]</p>