class ActiveModel::Type::Registration

def call(_registry, *args, **kwargs)

def call(_registry, *args, **kwargs)
  if kwargs.any? # https://bugs.ruby-lang.org/issues/10856
    block.call(*args, **kwargs)
  else
    block.call(*args)
  end
end

def initialize(name, block, **)

Options must be taken because of https://bugs.ruby-lang.org/issues/10856
def initialize(name, block, **)
  @name = name
  @block = block
end

def matches?(type_name, *args, **kwargs)

def matches?(type_name, *args, **kwargs)
  type_name == name
end