Skip to content

Commit 982dbdb

Browse files
authored
Remove Enumerable include from Statement class (brianmario#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.
1 parent f8560c5 commit 982dbdb

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

lib/mysql2/statement.rb

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
module Mysql2
22
class Statement
3-
include Enumerable
4-
53
def execute(*args, **kwargs)
64
Thread.handle_interrupt(::Mysql2::Util::TIMEOUT_ERROR_CLASS => :never) do
75
_execute(*args, **kwargs)

0 commit comments

Comments
 (0)