-
-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix memoized method subjects to preserve freezer option #973
Conversation
@mbj Ready for review. I see CI is failing integration tests but I'm not sure if you need me to recurse into these. |
@snusnu Code wise I'm fine, but the CI rusted. Hence it has to be fixed first. |
92310a8
to
b194e4c
Compare
b194e4c
to
ad6657b
Compare
151a7c9
to
18f070d
Compare
29ca4d4
to
34c3baa
Compare
c430ab8
to
a06b0c3
Compare
* 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.
f1ff55d
to
1d2c654
Compare
@@ -137,7 +153,7 @@ def foo; end | |||
it_should_behave_like 'a command method' | |||
end | |||
|
|||
describe '#mutations', mutant_expression: 'Mutant::Subject#mutations' do | |||
describe '#mutations' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@snusnu The fix for the last alive mutation was removing this overly specific overwrite!
Close #639