Feature #11337
closedAllow rescue without begin inside blocks
Description
While it's possible to have rescue's without begin in method definitions it's not possible to have the same facility inside blocks. For example, this is currently not possible:
1.times do
abc
rescue
p 'error'
end
But this is possible
def a
abc
rescue
p 'error'
end
Would it be possible to also allow rescue without begin inside blocks too?
Updated by rosenfeld (Rodrigo Rosenfeld Rosas) over 8 years ago
Updated by shyouhei (Shyouhei Urabe) over 8 years ago
- Is duplicate of Feature #7882: Allow rescue/else/ensure in do..end added
Updated by shyouhei (Shyouhei Urabe) over 8 years ago
Issues linked. I guess those duplicated issues synchronizes their status each other so I don't close them (am I correct?).
Updated by duerst (Martin Dürst) over 8 years ago
On 2016/08/02 10:54, shyouhei@ruby-lang.org wrote:
I guess those duplicated issues synchronizes their status each other so I don't close them (am I correct?).
I guess it depends on how you linked them. If it's just 'related', then
the status of each is independent. If it's 'depends on', then you can
close one without closing the other, but not the other way round. But
I'm not sure this is enforced.
Updated by rosenfeld (Rodrigo Rosenfeld Rosas) over 8 years ago
http://www.redmine.org/projects/redmine/wiki/RedmineIssues
"duplicates - Links issues so that closing one, will close the other (e.g. closing A will close B)
For example, if issue B duplicates A:
- closing B will leave A open
- closing A will automatically close B
duplicated by - Reciprocal of duplicates.
For example, if issue A is duplicated by issue B:
- closing B will leave A open
- closing A will automatically close B"
I'm not sure I completely understand this but it seems to be possible to close the duplicates without closing the original even though they would be automatically closed if using the right relation :)
Updated by rosenfeld (Rodrigo Rosenfeld Rosas) over 8 years ago
If I understood it correctly, this issues currently duplicates #7882 which means closing this one would keep the other open.
Updated by shyouhei (Shyouhei Urabe) over 8 years ago
- Status changed from Open to Closed
Hmm.. Thank you for the check. It is complicated than I thought. Closing this one anyway.
Updated by duerst (Martin Dürst) over 8 years ago
On 2016/08/04 04:23, rr.rosas@gmail.com wrote:
I'm not sure I completely understand this but it seems to be possible to close the duplicates without closing the original even though they would be automatically closed if using the right relation :)
Well, I guess closing the duplicate is done because it's recognized as a
duplicate and no longer needed. Closing the original means that the
problem itself is solved, so it would be wrong to keep the duplicates open.
Regards, Martin.
Updated by shyouhei (Shyouhei Urabe) almost 8 years ago
- Has duplicate Feature #12906: do/end blocks work with ensure/rescue/else added