deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r1211951 - /deltacloud/trunk/server/lib/deltacloud/core_ext/string.rb
Date Thu, 08 Dec 2011 16:21:56 GMT
Author: marios
Date: Thu Dec  8 16:21:56 2011
New Revision: 1211951

URL: http://svn.apache.org/viewvc?rev=1211951&view=rev
Log:
Adds exception to String::pluralize for 'data'
("metadata".pluralize != "metadatas")

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

Modified: deltacloud/trunk/server/lib/deltacloud/core_ext/string.rb
URL: http://svn.apache.org/viewvc/deltacloud/trunk/server/lib/deltacloud/core_ext/string.rb?rev=1211951&r1=1211950&r2=1211951&view=diff
==============================================================================
--- deltacloud/trunk/server/lib/deltacloud/core_ext/string.rb (original)
+++ deltacloud/trunk/server/lib/deltacloud/core_ext/string.rb Thu Dec  8 16:21:56 2011
@@ -35,6 +35,7 @@ class String
   def pluralize
     return self + 'es' if self =~ /ess$/
     return self[0, self.length-1] + "ies" if self =~ /ty$/
+    return self if self =~ /data$/
     self + "s"
   end
 



Mime
View raw message