aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@gmail.com>2016-04-09 12:57:08 -0400
committerEileen M. Uchitelle <eileencodes@gmail.com>2016-04-09 12:57:08 -0400
commit87c2c070c4cf1b62ac364c53496a2da000fbf9d6 (patch)
treec09bcb439aea67fd1cefd88f91da0ad1ad3e8593 /activesupport/lib
parente88d63e6f7a7e9a73484ea30859bf3b75a4b7188 (diff)
parent91386c1b355947955b05ee3846e4aedd4eec0eb1 (diff)
downloadrails-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.rb6
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