mongomapper/mongomapper — pull request #579 by bsoule (2014-06-24 18:31:33+00:00)
Title: fixes syntax error in rescue responses

There's a syntax error in the rescue response declarations for rails < 3.2, introduced in cf44aaa523.

It was causing MongoMapper::DocumentNotFound exceptions to cause an exception in WebBrick's exception handling in development. Specifically:

Error during failsafe response: undefined method `to_i' for #
/Users/bsoule/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.2.8/lib/rack/utils.rb:496:in `status_code'

The spurious commas were causing ActionDispatch::ShowExceptions.rescue_responses['MongoMapper::DocumentNotFound'] to get declared as [:not_found, :unprocessable_entity, :unprocessable_entity, :unprocessable_entity], and then rack was choking on it.