aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/profile4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/profile b/tools/profile
index eb7fc7792b..191e73b3dd 100755
--- a/tools/profile
+++ b/tools/profile
@@ -117,9 +117,9 @@ rescue LoadError
def camelize(uppercase_first_letter = true)
string = self
if uppercase_first_letter
- string = string.sub(/^[a-z\d]*/) { $&.capitalize }
+ string = string.sub(/^[a-z\d]*/) { |match| match.capitalize }
else
- string = string.sub(/^(?:(?=\b|[A-Z_])|\w)/) { $&.downcase }
+ string = string.sub(/^(?:(?=\b|[A-Z_])|\w)/) { |match| match.downcase }
end
string.gsub(/(?:_|(\/))([a-z\d]*)/) { "#{$1}#{$2.capitalize}" }.gsub('/', '::')
end