Skip to content

Commit

Permalink
Address offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
flash-gordon committed Jan 4, 2025
1 parent 8a6a43a commit 40cb665
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/dry/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class Inflector
# inflections.singular "thieves", "thief" # specify a rule for #singularize
# inflections.uncountable "dry-inflector" # add an exception for an uncountable word
# end
def initialize(&blk)
@inflections = Inflections.build(&blk)
def initialize(&)
@inflections = Inflections.build(&)
end

# Lower camelize a string
Expand Down
4 changes: 2 additions & 2 deletions lib/dry/inflector/rules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def insert(index, array)

# @since 0.1.0
# @api private
def each(&blk)
@rules.each(&blk)
def each(&)
@rules.each(&)
end
end
end
Expand Down
7 changes: 5 additions & 2 deletions spec/support/fixtures/pluralize.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def self.irregular
"goose" => "geese"
}.freeze

# rubocop:disable Metrics/CollectionLiteralLength
CASES = {
#
# Test cases from Inflecto
Expand Down Expand Up @@ -394,8 +395,10 @@ def self.irregular
"bosses" => "bosses",
"classes" => "classes",
"glasses" => "glasses",
"kisses" => "kisses"
}.merge(IRREGULAR).freeze
"kisses" => "kisses",
**IRREGULAR
}.freeze
# rubocop:enable Metrics/CollectionLiteralLength

# Missing rule or exception?
PENDING = {
Expand Down

0 comments on commit 40cb665

Please sign in to comment.