Skip to content

Commit 9b9d736

Browse files
committed
Siplify
1 parent 816c744 commit 9b9d736

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/gettext/po_entry.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,7 @@ class << self
241241
def escape(string)
242242
return "" if string.nil?
243243

244-
string.gsub(/([\\"\t\r\n])/) do
245-
special_character = $1
244+
string.gsub(/[\\"\t\r\n]/) do |special_character|
246245
case special_character
247246
when "\t"
248247
"\\t"

0 commit comments

Comments
 (0)