Tips and Tricks for Code Golfing in Ruby

Unicode compression trick:

eval’Ruby code in utf16’.encode(‘UCS-2BE’).b

Can you explain what this trick is doing?

Also, can you use code blocks when posting code? Either with the triple backticks ``` or with [code].

1 Like