From 982dbdb1d521c668547cfd4ab927558c689b8bfd Mon Sep 17 00:00:00 2001 From: Adam Crownoble Date: Wed, 5 Feb 2020 15:35:08 -0700 Subject: [PATCH] Remove Enumerable include from Statement class (#1104) I'm honestly not sure why this was here in the first place. Git blame seems to suggest that maybe it was added when the class was first created in anticipation for something that never materialized or has since been deprecated. As far as I can tell, `Enumerable` offers no advantages to the class since `Statement` doesn't implement `#each`. Here's an example of what I'm referring to ```ruby client = Mysql2::Client.new statement = client.prepare('select 1') statement.first statement.any? statement.min ``` Also all test pass with `Enumerable` gone, so it seems reasonable to remove it. --- lib/mysql2/statement.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/mysql2/statement.rb b/lib/mysql2/statement.rb index 2f9f09a05..f5ca35b86 100644 --- a/lib/mysql2/statement.rb +++ b/lib/mysql2/statement.rb @@ -1,7 +1,5 @@ module Mysql2 class Statement - include Enumerable - def execute(*args, **kwargs) Thread.handle_interrupt(::Mysql2::Util::TIMEOUT_ERROR_CLASS => :never) do _execute(*args, **kwargs)