This repository has been archived by the owner on Nov 30, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Be more permissive when detecting frozen objects
Rather than rely on an object's #frozen? method, always attempt to proxy a method when requested. Catch the errors resulting from failed attempts to proxy and reraise (or log) them with helpful messages. One notable use case for this is rails' activerecord's Model objects becoming frozen after be deleted. In reality, only the underlying hash of attributes is frozen and it should still be possible to write proxies for these objects.
- Loading branch information
1 parent
7823b0b
commit e446e02
Showing
3 changed files
with
67 additions
and
12 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