Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid unnecessary defined? usage on Ruby 3+ when using the :ensure op…
…tion defined? was used previously because before Ruby 3, accessing a undefined instance variable resulted in a verbose mode warning. As of Ruby 3, it no longer does, so there is no reason to use defined?. This results in fewer VM instructions, so this will improve performance, though the difference is unlikely to be measurable.
- Loading branch information
1 parent
f8ab0e5
commit 602ab7d
Showing
3 changed files
with
61 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
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