Project

General

Profile

Actions

Feature #20484

closed

A new pragma for eager resolution of classes referenced in rescue clauses.

Added by jfrisby (Jon Frisby) 7 months ago. Updated 6 months ago.

Status:
Feedback
Assignee:
-
Target version:
-
[ruby-core:117835]

Description

I've been using Ruby for 20 years, and just today learned (the hard way) that the class name(s) referenced in a rescue clause are not resolved until an exception occurs.

Upon reflection, this behavior probably makes sense in a lot of situations. Late resolution may simplify code loading for the developer.

I would, however, love to see an opt-in feature (a la frozen-string-literal) to force resolution when the code is loaded/parsed.

Actions

Also available in: Atom PDF

Like1
Like0Like0Like0Like0Like0