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")