Skip to content

Commit

Permalink
When core_ext/enumerable_with_progress extends existing modules, skip…
Browse files Browse the repository at this point in the history
… Refinements

Refinement#include removed as of Ruby 3.2
  • Loading branch information
notEthan committed Nov 21, 2024
1 parent 70eb837 commit 6bf6ae2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/progress_bar/core_ext/enumerable_with_progress.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6bf6ae2

Please sign in to comment.