なるようになるブログ

読書感想文かrailsについてかrubyについてか

rails commit log流し読み(2017/04/06)

2017/04/06分のコミットです。

CHANGELOGへの追加はありませんでした。


Work around all the things

actioncable/test/client_test.rbの修正です。

Pumaを使用してテストを行う際に、テストの後処理でIOErrorが発生した場合の対応を追加しています。

      begin
         thread.join
+
+      rescue IOError
+        # Work around https://bugs.ruby-lang.org/issues/13405
+        #
+        # Puma's sometimes raising while shutting down, when it closes
+        # its internal pipe. We can safely ignore that, but we do need
+        # to do the step skipped by the exception:
+        server.binder.close

既にcloseされているstreamに対してIO#closeを行った場合に、IOErrorが発生してしまう事がある(通常は無視されるが、Ruby側のバグで発生してしまうケースがある)為、その影響で処理が終了してしまわないようにする為に対応を追加したようです。

参考:Bug #13405: IO#close raises “stream closed”