I want to replace all & characters into & with String.gsub (or a other method). I've tried several combinations and read another question here, but nothing is gonna work.
&
String.gsub
"asdf & asdf".gsub("&", "\&") => "asdf & asdf"
Your linked question provides a solution - use the block form of gsub:
gsub
irb(main):009:0> puts "asdf & asdf".gsub("&"){'&'} asdf & asdf
2.1m questions
2.1m answers
60 comments
57.0k users