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
1.4m articles
1.4m replys
5 comments
57.0k users