Evaluate default attribute procs on #execute #269

Closed
hadronzoo opened this Issue Mar 30, 2015 · 2 comments

Comments

Projects
None yet
3 participants
@hadronzoo

Defaults attributes are evaluated on class definition, even if the default is a proc or a lambda. It would be useful and less surprising if default procs were executed when run! was called rather than when the interaction was required.

@hadronzoo hadronzoo changed the title from Evaluate default attribute procs in #execute to Evaluate default attribute procs on #execute Mar 30, 2015

@AaronLasseigne

This comment has been minimized.

Show comment
Hide comment
@AaronLasseigne

AaronLasseigne Mar 30, 2015

Owner

This is certainly worth some thought.

Owner

AaronLasseigne commented Mar 30, 2015

This is certainly worth some thought.

@tfausak

This comment has been minimized.

Show comment
Hide comment
@tfausak

tfausak Mar 30, 2015

Collaborator

Yeah, I agree. We didn't consider this when we made #141. The offending line is in ActiveInteraction::Base. It has been like that for a long while. I think it originally came from 6b165d5.

Collaborator

tfausak commented Mar 30, 2015

Yeah, I agree. We didn't consider this when we made #141. The offending line is in ActiveInteraction::Base. It has been like that for a long while. I think it originally came from 6b165d5.

@tfausak tfausak added this to the v2.0.0 milestone Mar 31, 2015

@tfausak tfausak self-assigned this Mar 31, 2015

tfausak added a commit that referenced this issue Apr 7, 2015

Merge pull request #271 from orgsync/gh-269
Don't eagerly evaluate proc defaults

@tfausak tfausak closed this Apr 7, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment