You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by mf...@redhat.com on 2012/07/19 15:02:47 UTC
[PATCH core 14/16] Core: Fixed 'singularize' helper in String to singularize 'properties'
From: Michal Fojtik <mf...@redhat.com>
Signed-off-by: Michal fojtik <mf...@redhat.com>
---
server/lib/deltacloud/core_ext/string.rb | 1 +
1 file changed, 1 insertion(+)
diff --git a/server/lib/deltacloud/core_ext/string.rb b/server/lib/deltacloud/core_ext/string.rb
index abf4a28..bc382ed 100644
--- a/server/lib/deltacloud/core_ext/string.rb
+++ b/server/lib/deltacloud/core_ext/string.rb
@@ -40,6 +40,7 @@ class String
end
def singularize
+ return self.gsub(/ies$/, 'y') if self =~ /ies$/
return self.gsub(/es$/, '') if self =~ /sses$/
self.gsub(/s$/, '')
end
--
1.7.10.2