Which Ruby memoize pattern does ActiveSupport::Memoizable refer to?

前端 未结 4 939
忘掉有多难
忘掉有多难 2021-01-30 16:14

So in Rails 3.2, ActiveSupport::Memoizable has been deprecated.

The message reads:

DEPRECATION WARNING: ActiveSupport::Memoizable is deprecated and
will          


        
4条回答
  •  忘掉有多难
    2021-01-30 16:47

    Based upon the comments on the commit referenced above by avaynshtok, I’m going with this:

    ActiveSupport::Deprecation.silence { extend ActiveSupport::Memoizable }
    

    … because I figure I’ll know when Memoizable is ripped out of ActiveSupport from my RSpec suite dying right out of the starting gate.

提交回复
热议问题