ダリのソースコードを読んでいて、これを見つけました...
module ActionDispatch
module Session
class DalliStore < AbstractStore
def initialize(app, options = {})
# Support old :expires option
options[:expire_after] ||= options[:expires]
super
@default_options = { :namespace => 'rack:session' }.merge(@default_options)
@pool = options[:cache] || begin
Dalli::Client.new(
@default_options[:memcache_server], @default_options)
end
@namespace = @default_options[:namespace]
@raise_errors = !!@default_options[:raise_errors]
super
end
.... rest of class definition
私が際立っていたのは、初期化中に super が 2 回呼び出されたことです。私は、この種の Ruby の慣用句を見たことがありません。なぜあなたはこれをしたいのですか?