deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject svn commit: r1203693 - /incubator/deltacloud/trunk/server/lib/deltacloud/core_ext/string.rb
Date Fri, 18 Nov 2011 15:28:19 GMT
Author: mfojtik
Date: Fri Nov 18 15:28:19 2011
New Revision: 1203693

URL: http://svn.apache.org/viewvc?rev=1203693&view=rev
Log:
Core: Fixed .pluralize to deal with values like 'property' => 'properties'

Modified:
    incubator/deltacloud/trunk/server/lib/deltacloud/core_ext/string.rb

Modified: incubator/deltacloud/trunk/server/lib/deltacloud/core_ext/string.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/deltacloud/core_ext/string.rb?rev=1203693&r1=1203692&r2=1203693&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/lib/deltacloud/core_ext/string.rb (original)
+++ incubator/deltacloud/trunk/server/lib/deltacloud/core_ext/string.rb Fri Nov 18 15:28:19
2011
@@ -34,6 +34,7 @@ class String
 
   def pluralize
     return self + 'es' if self =~ /ess$/
+    return self[0, self.length-1] + "ies" if self =~ /ty$/
     self + "s"
   end
 



Mime
View raw message