RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Understanding a Ruby Wat

http://pauloancheta.com/ruby/wat/2018/03/23/explaining-wats/ A few weeks ago, a co-worker found something really interesting. He posted on our slack channel this line of code. Does anyone know what the output of this is? “(data)”.gsub(“(data)”, “15\01\2018”)

If you were too lazy to open your irb here’s the output: “15(data)1018”

WAAAAT

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in