提交 afe96542 编写于 作者: S Steve Klabnik

Improve Process::Status#to_json

Because Process::Status has no instance_variables, the
ActiveSupport version of #to_json produces {}, which isn't good.

Therefore, we implement our own #as_json, which makes it useful
again.

Fixes #4857
上级 60c88e64
......@@ -17,3 +17,11 @@ def to_json(options = nil)
end
end
end
module Process
class Status
def as_json(options = nil)
{ :exitstatus => exitstatus, :pid => pid }
end
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册