Using lambda syntax to keep compatibility with ruby < 1.9