From f78dc3cc6e584ba2084d7f22033281b2ce6f5d7c Mon Sep 17 00:00:00 2001 From: Sean Collins Date: Mon, 9 Sep 2024 16:56:04 -0700 Subject: [PATCH] Rubocop --- lib/dry/inflector.rb | 4 +++- spec/unit/dry/inflector/camelize_lower_spec.rb | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/dry/inflector.rb b/lib/dry/inflector.rb index d1a3de1..3608fab 100644 --- a/lib/dry/inflector.rb +++ b/lib/dry/inflector.rb @@ -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) diff --git a/spec/unit/dry/inflector/camelize_lower_spec.rb b/spec/unit/dry/inflector/camelize_lower_spec.rb index 8a5b99a..43f782d 100644 --- a/spec/unit/dry/inflector/camelize_lower_spec.rb +++ b/spec/unit/dry/inflector/camelize_lower_spec.rb @@ -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")