From 6bf6ae2022c6db37377fa9e1da5c5d506d17041e Mon Sep 17 00:00:00 2001 From: Ethan Date: Wed, 20 Nov 2024 22:05:39 -0800 Subject: [PATCH] When core_ext/enumerable_with_progress extends existing modules, skip Refinements Refinement#include removed as of Ruby 3.2 --- lib/progress_bar/core_ext/enumerable_with_progress.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/progress_bar/core_ext/enumerable_with_progress.rb b/lib/progress_bar/core_ext/enumerable_with_progress.rb index 0875e93..1408e2b 100644 --- a/lib/progress_bar/core_ext/enumerable_with_progress.rb +++ b/lib/progress_bar/core_ext/enumerable_with_progress.rb @@ -3,7 +3,7 @@ require_relative "../../progress_bar" ObjectSpace.each_object(Module) do |mod| - if mod <= Enumerable + if !mod.is_a?(Refinement) && mod <= Enumerable mod.send :include, ProgressBar::WithProgress end end