rails/rails — pull request #16785 by cristianbica (2014-09-03 07:50:10+00:00)
Title: Fix for double ActiveJob::DeserializationErorr

If an argument that cannot be serialized is not in the first level of arguments (it's in an array or hash) the error is double wrapped inside DeserializationError. Example:

```ruby
# enqueueing the Person object from the AJ testing wrapped in an array
RescueJob.enqueue [Person.new(404)]
# will raise

> puts e.inspect
#

> puts e.class.name
ActiveJob::DeserializationError

> puts e.original_exception.class.name
ActiveJob::DeserializationError

> puts e.original_exception.original_exception.class.name
Person::RecordNotFound
```