[前][次][番号順一覧][スレッド一覧]

ruby-changes:63447

From: Koichi <ko1@a...>
Date: Tue, 27 Oct 2020 01:37:43 +0900 (JST)
Subject: [ruby-changes:63447] 1c6ebe14fb (master): freeze Process::Status

https://git.ruby-lang.org/ruby.git/commit/?id=1c6ebe14fb

From 1c6ebe14fbdb2bc23878133cbf7a99ea856e3d89 Mon Sep 17 00:00:00 2001
From: Koichi Sasada <ko1@a...>
Date: Tue, 20 Oct 2020 11:05:04 +0900
Subject: freeze Process::Status

It seems immutable information.

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) https://github.com/ruby/ruby/blob/trunk/process.c#L602
     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
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]