mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Ruby 1.9 compat: corrected instance_methods check
[#3156 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
@@ -8,7 +8,8 @@ module MysqlCompat #:nodoc:
|
||||
raise 'Mysql not loaded' unless defined?(::Mysql)
|
||||
|
||||
target = defined?(Mysql::Result) ? Mysql::Result : MysqlRes
|
||||
return if target.instance_methods.include?('all_hashes')
|
||||
return if target.instance_methods.include?('all_hashes') ||
|
||||
target.instance_methods.include?(:all_hashes)
|
||||
|
||||
# Ruby driver has a version string and returns null values in each_hash
|
||||
# C driver >= 2.7 returns null values in each_hash
|
||||
|
||||
Reference in New Issue
Block a user