rails/rails — pull request #12214 by chancancode (2013-09-13 07:09:04+00:00)
Title: Raise an error when AS::JSON.decode is called with options

Rails 4.1 has switched away from MultiJson, and does not currently support any options on `ActiveSupport::JSON.decode`. Passing in unsupported options (i.e. any non-empty options hash) will raise an ArgumentError.

Rationale:

1. We cannot guarantee the underlying JSON parser won't change in the future, hence we cannot guarantee a consistent set of options the method could take

2. The `json` gem, which happens to be the current JSON parser, takes many dangerous options that is irrelevant to our purpose

3. To reserve the options hash for future use, e.g. overriding default global options like `ActiveSupport.parse_json_times`