]> git.notmuchmail.org Git - sup/commitdiff
minor: remove ucfirst (use capitalize instead)
authorWilliam Morgan <wmorgan-sup@masanjin.net>
Wed, 13 May 2009 19:47:50 +0000 (12:47 -0700)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Wed, 13 May 2009 19:47:50 +0000 (12:47 -0700)
lib/sup/label.rb
lib/sup/util.rb

index 70a26ead5409e2b63a0edef48cb2a9bb4ef4cc6a..11bf30d76b6578d728ddef39e681e5693c725df1 100644 (file)
@@ -46,7 +46,7 @@ class LabelManager
   ## reverse the label->string mapping, for convenience!
   def string_for l
     if RESERVED_LABELS.include? l
-      l.to_s.ucfirst
+      l.to_s.capitalize
     else
       l.to_s
     end
index dbcffcc5951356dec2c533393ba100b4071b8eac..8b92fd2e079761965d3684ab051aee1b72cf6840 100644 (file)
@@ -188,11 +188,6 @@ class String
     ret
   end
 
-  ## one of the few things i miss from perl
-  def ucfirst
-    self[0 .. 0].upcase + self[1 .. -1]
-  end
-
   ## a very complicated regex found on teh internets to split on
   ## commas, unless they occurr within double quotes.
   def split_on_commas