Is there a shortcut in Ruby to receive a lambda which simply returns its argument?
I'm trying to have the following function:
def some_method(x, y, decorator = ->(x) { x })
…
end
Rewritten to look somehow like
def some_method(x, y, decorator = method(:itself))
…
end
Maybe there's a way to change the receiver with Object#itself?