Actions
Bug #20026
closedRuby doesn't throw a syntax error when rescuing with ||
Bug #20026:
Ruby doesn't throw a syntax error when rescuing with ||
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 3.2.0 (2022-12-25 revision a528908271) [arm64-darwin23]
Description
We had a coworker new to ruby try an interesting syntax for rescue that doesn't result in a syntax error, and works partially.
Why does ruby allow the logical OR || operator, is there a purpose for this? If not this feels like it should be a syntax error, instead of resulting in partially working code.
Updated by arian (Arian Faurtosh) almost 3 years ago
Actually I see what's going on here, this can be closed, not actually a ruby issue.
FooError || BarError is evaluating to FooError
Updated by jeremyevans0 (Jeremy Evans) almost 3 years ago
- Status changed from Open to Rejected
Updated by nobu (Nobuyoshi Nakada) almost 3 years ago
Actions