Skip to content

Commit

Permalink
Ruby 1.9 compat: corrected instance_methods check
Browse files Browse the repository at this point in the history
[#3156 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information
sdsykes authored and jeremy committed Sep 13, 2009
1 parent 6ddb7de commit 8afeec2
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -7,7 +7,8 @@ def self.define_all_hashes_method!
raise 'Mysql not loaded' unless defined?(::Mysql) raise 'Mysql not loaded' unless defined?(::Mysql)


target = defined?(Mysql::Result) ? Mysql::Result : MysqlRes 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 # Ruby driver has a version string and returns null values in each_hash
# C driver >= 2.7 returns null values in each_hash # C driver >= 2.7 returns null values in each_hash
Expand Down

0 comments on commit 8afeec2

Please sign in to comment.