Skip to content

Commit

Permalink
Remove ruby2_keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
flash-gordon committed Dec 31, 2024
1 parent 6a330de commit aa512e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions lib/rom/sql/schema/index_dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ class IndexDSL # < BasicObject
attr_reader :registry

# @api private
def initialize(*, &block)
def initialize(*, **, &block)
super

@registry = []

instance_exec(&block)
end
ruby2_keywords(:initialize) if respond_to?(:ruby2_keywords, true)

# @api public
def index(*attributes, **options)
Expand Down
5 changes: 2 additions & 3 deletions spec/support/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@ def define_attribute(name, id, **opts)
ROM::SQL::Attribute.new(type.meta(opts), name: name)
end

def build_assoc(type, *args)
def build_assoc(type, *args, **kwargs)
klass = ROM::Inflector.classify(type)
definition = ROM::Associations::Definitions.const_get(klass).new(*args)
definition = ROM::Associations::Definitions.const_get(klass).new(*args, **kwargs)
ROM::SQL::Associations.const_get(definition.type).new(definition, relations)
end
ruby2_keywords(:build_assoc) if respond_to?(:ruby2_keywords, true)

def attributes(schema)
schema.each_with_object({}) do |(key, type), acc|
Expand Down

0 comments on commit aa512e3

Please sign in to comment.