Skip to content

Conversation

dark-panda
Copy link

This isn't exactly ideal, as a more proper fix would involve checking the Method#parameters values for rest and kwargs arguments, but the basic idea is this patch gets Memoist working with Ruby 3.0.0's more distinct separation of argument types by reverting back to Ruby 2-style memoized methods. It would be much better to support this new style of arguments, but in the meantime, this will work with the caveat that only Ruby 2-style methods can be memoized using Ruby 3+, and even then only temporarily, as the ruby2_keywords method is only a temporary fix according to their docs. (See https://ruby-doc.org/core-3.0.0/Module.html#method-i-ruby2_keywords.)

@dark-panda dark-panda force-pushed the use-ruby2-keywords branch 2 times, most recently from 24146f4 to eb3d999 Compare February 2, 2021 17:49
@Galathius
Copy link

👍

@honzasterba
Copy link

I think #92 is a better solution

@pboling
Copy link
Contributor

pboling commented Jun 4, 2024

FYI: Added this alert to the new memoist repo

Important

Recommendation

Consider using MemoWise instead, as it is maintained, fully tested, provides thread safety guarantees, and is much, much faster.

Other Alternatives

In case you need a tool with this feature set that is currently maintained, check out:

Tip

Seriously though, read the important note above.

Warning

If you must continue - be aware that this is unmaintained software.

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.

4 participants