Q:

Is there an elegant way to pass 'do nothing' as a lambda?

Suppose I have a method, foo, which requires a lambda parameter. The lambda is invoked by foo with arguments. I don't actually want anything to happen upon execution of the lambda.
Currently, I'm doing this:
foo(->(*) {})

This looks a tad ugly, and I have to believe that there is a more elegant and legible way of writing this built into the Ruby language.
Is there a better way of passing a 'do nothing' lambda?

A:

I would recommend rethinking foo instead.
That being said I do not think there is a more elegant way, but if you really wanted to you could add something like this (which is uglier in my opinion than what you have)
module Kernel
  def noop
    Proc.new {}
  end
end

Then call as 
def foo(blk)
  blk.call(1,2,3,4,5)
end

foo(noop) 
#=> nil

