commit a3b23af3ea3cd0f703fc903db9b87c4bff1830a2
parent d6aef055e73ff75603fa3f7ef0e4558e13442e5c
Author: William Morgan <wmorgan-sup@masanjin.net>
Date: Wed, 13 May 2009 12:47:50 -0700
minor: remove ucfirst (use capitalize instead)
Diffstat:
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git 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
@@ -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