-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
irb [2.3.7] (class2)$ Strings::Inflection.singularize("a") # expect "a"
=> "on"
irb [2.3.7] (class2)$ Strings::Inflection.singularize("gas") # expect "gas"
=> "ga"
irb [2.3.7] (class2)$ Strings::Inflection.singularize("gas", term: :verb) # expect "gas"
=> "gasses"
irb [2.3.7] (class2)$ Strings::Inflection.singularize("la") # expect "la"
=> "lon"
irb [2.3.7] (class2)$ Strings::Inflection.singularize("ala") # expect "ala"
=> "alon"
irb [2.3.7] (class2)$ Strings::Inflection.singularize("ss") # expect "s"
=> "s"
Using a lot of .* for regexes. Well at least in the case of "a" this is certainly the problem.
Also not sure if this is a feature or bug:
irb [2.3.7] (class2)$ Strings::Inflection.singularize("cars\ntrucks\nbikes")
=> "car\ntrucks\nbikes"
I think bug but saw you were using \A and $ instead of \A and \z so just asking.
rafaltrojanowski
Metadata
Metadata
Assignees
Labels
No labels