lib/briard/string.rb in briard-2.4.2 vs lib/briard/string.rb in briard-2.6.0
- old
+ new
@@ -1,7 +1,7 @@
# frozen_string_literal: true
class String
def my_titleize
- self.gsub(/\b(['’]?[a-z])/) { "#{$1.capitalize}" }
+ gsub(/\b(['’]?[a-z])/) { ::Regexp.last_match(1).capitalize.to_s }
end
end