[#66126] Creation/Conversion methods/functions table for Ruby types — SASADA Koichi <ko1@...>
Hi,
5 messages
2014/11/07
[#66248] [ruby-trunk - Feature #10423] [PATCH] opt_str_lit*: avoid literal string allocations — normalperson@...
Issue #10423 has been updated by Eric Wong.
3 messages
2014/11/13
[#66595] [ruby-trunk - Bug #10557] [Open] Block not given when the argument is a string — bartosz@...
Issue #10557 has been reported by Bartosz Kopinski.
3 messages
2014/11/30
[ruby-core:66226] Re: [ruby-trunk - Feature #10042] Deprecate postfix rescue syntax for removal in 3.0
From:
Avdi Grimm <avdi@...>
Date:
2014-11-12 14:31:25 UTC
List:
ruby-core #66226
On Mon, Nov 10, 2014 at 10:25 PM, <matz@ruby-lang.org> wrote: > I haven't seen any "serious" problem caused by exceptions swallowed by > postfix "rescue". So I don't worry too much about the issue. I won't claim that writing a book on Ruby exceptions makes me an expert. But at least I've made a special study of them for the past decade or so of Ruby use, and over numerous large-scale client projects. Of bugs that could be traced to use of a language feature, postfix rescue is easily in the top three. In fact, offhand I'm not sure I can think of *any* language feature whose use has led directly to more problems than this one. Unless you count "the existence of nil" as a language feature ;-) Postfix rescue bugs are especially insidious, because they usually hide *other* bugs. Can you accidentally throw away exceptions without it? Sure. But other methods are more visually obvious. Postfix rescue hides out at the ends of long lines in legacy codebases, quietly breaking things. The abuse of postfix rescue is so bad in Ruby projects that at this point I consider only one usage of it acceptable: `rescue $!` for converting exceptions to returns. I flag any other usage as an error, because if it isn't causing problems already, it almost certainly will eventually. I would like to see some equivalent of `rescue $!` stay in the language, but other than that I'd be more than happy to see it leave the building entirely. -- Avdi Grimm http://avdi.org