Good example for two of the biggest wrongs with ruby.
First wrong would be that it doesn't emit a useful error message in first place. Not sure why that is the case, but e.g. python would always include the value it failed on in a DivByZero Exception.
Second wrong would be that these kind of hacks seem to be widely accepted in the ruby community. Only because you can doesn't mean you should. DRY and conciseness are worthy goals, but not at the expense of sanity please.
Ha, good call. Looks like I missed the point by a good margin.
Yet I still have to wonder where the desire for this functionality is even coming from. The "cure" looks by far more problematic than the disease in any case.
First wrong would be that it doesn't emit a useful error message in first place. Not sure why that is the case, but e.g. python would always include the value it failed on in a DivByZero Exception.
Second wrong would be that these kind of hacks seem to be widely accepted in the ruby community. Only because you can doesn't mean you should. DRY and conciseness are worthy goals, but not at the expense of sanity please.