From: William Morgan Date: Wed, 13 May 2009 19:47:50 +0000 (-0700) Subject: minor: remove ucfirst (use capitalize instead) X-Git-Url: https://git.notmuchmail.org/git?a=commitdiff_plain;h=a3b23af3ea3cd0f703fc903db9b87c4bff1830a2;p=sup minor: remove ucfirst (use capitalize instead) --- diff --git a/lib/sup/label.rb b/lib/sup/label.rb index 70a26ea..11bf30d 100644 --- a/lib/sup/label.rb +++ b/lib/sup/label.rb @@ -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 diff --git a/lib/sup/util.rb b/lib/sup/util.rb index dbcffcc..8b92fd2 100644 --- a/lib/sup/util.rb +++ b/lib/sup/util.rb @@ -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