Skip to content
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

Create DeepFreeze refinement for use in definables #253

Closed
bryanp opened this issue Mar 29, 2017 · 4 comments
Closed

Create DeepFreeze refinement for use in definables #253

bryanp opened this issue Mar 29, 2017 · 4 comments
Milestone

Comments

@bryanp
Copy link
Contributor

bryanp commented Mar 29, 2017

The Definable module freezes the object once an instance is created, but the object itself must implement freeze and freeze its own state. I'd like to add a DeepFreeze refinement to pakyow/support that will be used instead. DeepFreeze will call deep_freeze on any ivars defined on the object, then freeze itself. We should also be able to remove the freeze definitions on Router and Route.

@bryanp bryanp added this to the 1.0 milestone Mar 29, 2017
@jphager2
Copy link
Contributor

@jphager2
Copy link
Contributor

jphager2 commented May 23, 2017

Looks like there will be a problem with freezing all ivars. A Pakyow::App has stores the Rack::Builder in an ivar, and that cant be frozen apparently.

Maybe we can have an UNFREEZABLE list a la deep_dup's UNDUPABLE.

@bryanp
Copy link
Contributor Author

bryanp commented May 23, 2017

I think unfreezable makes sense, but maybe defined on the scope being refined? That would let Pakyow::App register the @builder ivar as being unfreezable.

@jphager2
Copy link
Contributor

ok I made an update to the pull request.

@bryanp bryanp closed this as completed Jun 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants