Skip to content

Commit

Permalink
Do not use send for public methods
Browse files Browse the repository at this point in the history
  • Loading branch information
flash-gordon committed Jan 6, 2025
1 parent 9a54524 commit bb81067
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/dry/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def self.define(...)
def self.Params(**options, &)
define(**options, processor_type: Params, &)
end
singleton_class.send(:alias_method, :Form, :Params)
singleton_class.alias_method(:Form, :Params)

# Define a schema suitable for JSON data
#
Expand Down
4 changes: 2 additions & 2 deletions lib/dry/schema/extensions/struct.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def struct?(type)
})
end

PredicateInferrer::Compiler.send(:alias_method, :visit_struct, :visit_hash)
PrimitiveInferrer::Compiler.send(:alias_method, :visit_struct, :visit_hash)
PredicateInferrer::Compiler.alias_method(:visit_struct, :visit_hash)
PrimitiveInferrer::Compiler.alias_method(:visit_struct, :visit_hash)
end
end

0 comments on commit bb81067

Please sign in to comment.