Last Updated: February 25, 2016
·
1.943K
· alfuken

Define Ruby methods and variables with space in name

add these links to current user profile (link1, link2)
#...
photo.mark as liked by the current user

Want to be able to write this in ruby?
Ruby allows you to use non-breaking space ( ) in method's name. As well as any (almost) valid unicode symbol, like: "пиво = 42".
Using this trick, you can take ruby's DSL to a whole new level.

Courtesy of http://www.rubyinside.com/the-split-is-not-enough-whitespace-shenigans-for-rubyists-5980.html

P.S. Happy debugging! :D