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

Implemented BlocksNotSupported extension #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JelF
Copy link

@JelF JelF commented Dec 18, 2015

Implemented BlocksNotSupported extension to handle fact that blocks are not supported

closes #39

@JelF
Copy link
Author

JelF commented Dec 18, 2015

fails in travis same as at master, porbably gemspec misconfiguration

@matthewrudy
Copy link
Owner

I never replied on this
but the problem is that this makes it a runtime check any time you load a memoized method.

@JelF
Copy link
Author

JelF commented Jul 22, 2016

There is no way to check this outside runtime

@sebjacobs sebjacobs force-pushed the master branch 2 times, most recently from 9d66c95 to 34f90dd Compare November 8, 2019 21:05
@TylerRick
Copy link

This seems like something we should merge.

I just got bit by a bug where I was passing a block to a memoized method and trying to figure out why it was not seeing it (block_given? was false inside that method). If it had raised this error instead of silently ignoring (not passing on) my block, I would have found out about the problem immediately.

Personally, I think there should an option to let you pass blocks — useful if you can be sure you will pass the same block any time you pass the same arguments — but I can understand the reasoning behind this (Memoist can't be sure that you will pass the same block every time, and if you pass a different block that would have given a different result, it should not return the wrong result).

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

Successfully merging this pull request may close these issues.

&block is omited when method memoized
3 participants