-
-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix memoized method subjects to preserve freezer option
* If Memoizable alone is included in the subject scope, #memoize does not support any options. * Adamantium extends Memoizable by adding support for configuring the freezer to be used as an option for #memoize. * If Adamantium is included in the subject scope, the freezer that was either used implicitly or configured explicitly, needs to be preserved to keep original semantics intact. * The AST generated for the call to #memoize exhibits semantics that are equivalent to the originally defined memoizer. It may not always lead to identical source when being unparsed though. This is because memoizable provides no API to reflect on whether the freezer was configured implicitly by the adamantium module or whether it was set explicitly via the :freezer option added by adamantium.
- Loading branch information
Showing
2 changed files
with
151 additions
and
11 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