From 989452b26efef7d8644e6dc4db8486fd5972f997 Mon Sep 17 00:00:00 2001 From: Shizuo Fujita Date: Wed, 21 Oct 2026 13:38:58 +0900 Subject: [PATCH] Document that Loop.new raises RuntimeError when no backend is usable PR #119 made Loop.new raise RuntimeError instead of crashing when no selected backend is usable. The documentation did not mention it, or that $LIBEV_FLAGS can cause it unless :skip_environment is true. Co-Authored-By: Claude Opus 5.5 --- lib/cool.io/loop.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/cool.io/loop.rb b/lib/cool.io/loop.rb index 1d5ff99..bf17571 100644 --- a/lib/cool.io/loop.rb +++ b/lib/cool.io/loop.rb @@ -38,6 +38,10 @@ def self.default # :kqueue (BSD/Mac OS X) # :port (Solaris 10) # + # Raises RuntimeError if none of the selected backends is usable. + # Unless :skip_environment is true, $LIBEV_FLAGS can override the + # backend selection and cause the same error. + # def initialize(options = {}) @watchers = {} @active_watchers = 0