I've been on this for a bit now trying to find out why this breaks but
I can't. Hopefully someone else will have some idea.
I've been compiling a hash of which one of the objects is request.env.
I then call #to_json on the hash but it fails with:
"You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.pop"
Calling #to_json on request.env.to_hash also fails with error "stack
level too deep".
From the backtrace you can see a loop of the following happening:
Anyone have any thoughts on this?