Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ruby 1.9 compat: corrected instance_methods check

[#3156 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
commit 8afeec20e0f664613ddf9e1f965c1d8d5262b8ea 1 parent 6ddb7de
Stephen Sykes sdsykes authored jeremy committed
3  activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
View
@@ -7,7 +7,8 @@ def self.define_all_hashes_method!
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
Please sign in to comment.
Something went wrong with that request. Please try again.