]> git.openstreetmap.org Git - rails.git/blobdiff - lib/short_link.rb
Fix rubocop warnings
[rails.git] / lib / short_link.rb
index ddf37b67acf02bc9a51ae5cdac5f62ea5dae6c4f..43d64041e6b7a765114f36ea4b7e302dd3ac392a 100644 (file)
@@ -22,7 +22,7 @@ module ShortLink
     # keep support for old shortlinks which use the @ character, now
     # replaced by the ~ character because twitter is horribly broken
     # and we can't have that.
     # keep support for old shortlinks which use the @ character, now
     # replaced by the ~ character because twitter is horribly broken
     # and we can't have that.
-    str.gsub!("@", "~")
+    str.tr!("@", "~")
 
     str.each_char do |c|
       t = ARRAY.index c
 
     str.each_char do |c|
       t = ARRAY.index c