-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix invalid returns in class getter's lazy evaluation blocks (#15364)
Using `return` in a class getter will immediately return from the generated method, never setting the class variable to the returned value, which is kept nil and so the initializer code is called repeatedly instead of being called _once_ then cached.
- Loading branch information
1 parent
df06679
commit bac59ec
Showing
2 changed files
with
6 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters