diff options
author | Eileen M. Uchitelle <eileencodes@gmail.com> | 2016-04-09 12:57:08 -0400 |
---|---|---|
committer | Eileen M. Uchitelle <eileencodes@gmail.com> | 2016-04-09 12:57:08 -0400 |
commit | 87c2c070c4cf1b62ac364c53496a2da000fbf9d6 (patch) | |
tree | c09bcb439aea67fd1cefd88f91da0ad1ad3e8593 /activesupport/lib | |
parent | e88d63e6f7a7e9a73484ea30859bf3b75a4b7188 (diff) | |
parent | 91386c1b355947955b05ee3846e4aedd4eec0eb1 (diff) | |
download | rails-87c2c070c4cf1b62ac364c53496a2da000fbf9d6.tar.gz rails-87c2c070c4cf1b62ac364c53496a2da000fbf9d6.tar.bz2 rails-87c2c070c4cf1b62ac364c53496a2da000fbf9d6.zip |
Merge pull request #23702 from namusyaka/fix-json-behavior
Fix behavior of JSON encoding for Exception
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/json.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/json.rb b/activesupport/lib/active_support/core_ext/object/json.rb index 0db787010c..d49b2fbe54 100644 --- a/activesupport/lib/active_support/core_ext/object/json.rb +++ b/activesupport/lib/active_support/core_ext/object/json.rb @@ -197,3 +197,9 @@ class Process::Status #:nodoc: { :exitstatus => exitstatus, :pid => pid } end end + +class Exception + def as_json(options = nil) + to_s + end +end |