Inflector stops on the first match

Hi there.

I’m checking the Inflector code there and found, for example, on
singularize:

inflections.singulars.each { |(rule, replacement)| break if
result.gsub!(rule, replacement) }

This means that when it finds the first match, it breaks and stops
processing rules? And what if I need to deal with more that one rule on
the same string? For example, working on the middle and the end of a
CamelCase string?

Thanks!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs