Operating Nothing

1 · Jan Lelis · May 28, 2015, midnight
There is an operator in Ruby, that does nothing: The unary plus operator. It is part of the language for keeping symmetry with the unary minus operator! This is awesome, an operator for free! How can we utilize it? Update: In Ruby 2.3, the plus operator got its first purpose: Create an unfrozen copy of a string string = "frozen string".freeze string.object_id # => 19066860 string.frozen? # => true copy = +string copy.object_id # => 19012140 copy.frozen? # => false 1 | Logging require 'logger'...