Passing lambda to exq job

Is it a good idea to pass lambda to exq job. How it will behave after code upgrade ? I am trying to build abstraction layer over some code. Passing lambda seems easy but I am worried because I have faced some serialization issue while working on rails. Basically old failed job serialized some methods which were changed.