When your block takes an argument that should have an default, only in Ruby 1.9 you can say:
block = lambda do |message, options = {}|
# ...
end
If you are on Ruby 1.8.6 or 1.8.7 you must resort to the following workaround:
block = lambda do |*args|
message = args[0]
options = args[1] || {}
end
Posted by Henning Koch to makandra dev (2010-12-29 13:41)