From a3b23af3ea3cd0f703fc903db9b87c4bff1830a2 Mon Sep 17 00:00:00 2001 From: William Morgan Date: Wed, 13 May 2009 12:47:50 -0700 Subject: [PATCH] minor: remove ucfirst (use capitalize instead) --- lib/sup/label.rb | 2 +- lib/sup/util.rb | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) 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 -- 2.45.2