# Hello World Program in Ruby def output(out) puts out; end thing = "https://www.google.com" output("Thing: #{thing}") output("Sub!:" + thing.sub("https://", "https://").to_s) output("Thing: #{thing}") output("Sub!:" + thing.sub("https://", "https://").to_s) output("Thing: #{thing}") output("Sub!:" + thing.sub!("https://", "https://").to_s) output("Thing: #{thing}") output("Sub!:" + thing.sub!("https://", "https://").to_s) output("Thing: #{thing}")
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more