aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2012-09-15 05:39:40 -0700
committerXavier Noria <fxn@hashref.com>2012-09-15 05:39:40 -0700
commit3ec6783613e062da231d9a0d335cbf61bfad4bb4 (patch)
treefd3cd02625c04ea384ca079ef839b8f09a1c4700
parenta086ef6f17b5baa15da0234ac682f1d4f1ff4d2a (diff)
parentafe96542977ed52d0e80164b5079b3e5541fdcdb (diff)
downloadrails-3ec6783613e062da231d9a0d335cbf61bfad4bb4.tar.gz
rails-3ec6783613e062da231d9a0d335cbf61bfad4bb4.tar.bz2
rails-3ec6783613e062da231d9a0d335cbf61bfad4bb4.zip
Merge pull request #7654 from steveklabnik/issue_4857
Improve Process::Status#to_json
-rw-r--r--activesupport/lib/active_support/core_ext/object/to_json.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/to_json.rb b/activesupport/lib/active_support/core_ext/object/to_json.rb
index e7dc60a612..83cc8066e7 100644
--- a/activesupport/lib/active_support/core_ext/object/to_json.rb
+++ b/activesupport/lib/active_support/core_ext/object/to_json.rb
@@ -17,3 +17,11 @@ end
end
end
end
+
+module Process
+ class Status
+ def as_json(options = nil)
+ { :exitstatus => exitstatus, :pid => pid }
+ end
+ end
+end