summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-10-20 11:05:04 +0900
committerKoichi Sasada <ko1@atdot.net>2020-10-27 01:37:24 +0900
commit1c6ebe14fbdb2bc23878133cbf7a99ea856e3d89 (patch)
tree7883f2b5d08303d1aedc764cfadda7f6f8e7c57c
parentbdd1d17ac2c14ed937944860e1ec6b361a2fda6d (diff)
freeze Process::Status
It seems immutable information.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3671
-rw-r--r--process.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/process.c b/process.c
index 5ec02f4..e9d8264 100644
--- a/process.c
+++ b/process.c
@@ -602,6 +602,7 @@ rb_last_status_set(int status, rb_pid_t pid)
th->last_status = rb_obj_alloc(rb_cProcessStatus);
rb_ivar_set(th->last_status, id_status, INT2FIX(status));
rb_ivar_set(th->last_status, id_pid, PIDT2NUM(pid));
+ rb_obj_freeze(th->last_status);
}
void