ruby-changes:50027
From: nobu <ko1@a...>
Date: Thu, 1 Feb 2018 02:26:25 +0900 (JST)
Subject: [ruby-changes:50027] nobu:r62145 (trunk): io.c: fix fptr_copy_finalizer
nobu 2018-02-01 02:26:20 +0900 (Thu, 01 Feb 2018) New Revision: 62145 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62145 Log: io.c: fix fptr_copy_finalizer * io.c (fptr_copy_finalizer): fix inverted condition. if finalizer does not change, pipe_list should not change too. Modified files: trunk/io.c Index: io.c =================================================================== --- io.c (revision 62144) +++ io.c (revision 62145) @@ -6201,12 +6201,14 @@ fptr_copy_finalizer(rb_io_t *fptr, const https://github.com/ruby/ruby/blob/trunk/io.c#L6201 { #if defined(__CYGWIN__) || !defined(HAVE_WORKING_FORK) void (*const old_finalize)(struct rb_io_t*,int) = fptr->finalize; + + if (old_finalize == fptr->finalize) return; #endif fptr->finalize = orig->finalize; #if defined(__CYGWIN__) || !defined(HAVE_WORKING_FORK) - if (old_finalize == pipe_finalize) { + if (old_finalize != pipe_finalize) { struct pipe_list *list; for (list = pipe_list; list; list = list->next) { if (list->fptr == fptr) break; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/