How do i remove empty lines from a string? I have tried some_string = some_string.gsub(/^$/, \"\");
and much more, but nothing works.
squeeze (or squeeze!) does just that - without a regex.
str.squeeze("\n")