Skip to content

Conversation

@qpSHiNqp
Copy link

Just a small logging improvement for PerformableMethod.
This PR adds warning message when Object#delay is called with a block given.

Use case:
The code below won't perform as intended because blocks cannot be serialized and thus a job will ignore the block.

SomeModel.first.delay.tap do |record|
  record.touch # => raises "LocalJumpError: no block given"
end

I think it is convenient to display a warning like Ignored the block XXX because it cannot be serialized. when developers using the gem accidentally give block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant