Skip to content

Commit

Permalink
Rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
cllns committed Sep 9, 2024
1 parent 3efbaa7 commit f78dc3c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/dry/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,9 @@ def to_s
# @api private
def internal_camelize(input, upper)
input = input.to_s.dup
input.sub!(/^[[:lower:][:digit:]]*/) { |match| inflections.acronyms.apply_to(match, capitalize: upper) }
input.sub!(/^[[:lower:][:digit:]]*/) do |match|
inflections.acronyms.apply_to(match, capitalize: upper)
end
input.gsub!(%r{(?:[_-]|(/))([[:lower:][:digit:]]*)}i) do
m1 = Regexp.last_match(1)
m2 = Regexp.last_match(2)
Expand Down
1 change: 0 additions & 1 deletion spec/unit/dry/inflector/camelize_lower_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
expect(subject.camelize_lower(i("free_bsd"))).to eql("freeBSD")
end


it "handles diacritics" do
expect(subject.camelize_lower(i("éclair_fest"))).to eql("éclairFest")
expect(subject.camelize_lower(i("éua-trip"))).to eql("ÉUATrip")
Expand Down

0 comments on commit f78dc3c

Please sign in to comment.