From a3024f81228d7b3b446408114a5dc2a86870cd35 Mon Sep 17 00:00:00 2001 From: kennyj Date: Tue, 11 Sep 2012 00:15:29 +0900 Subject: Fix annoy warning, when executing testcase. --- activerecord/test/support/mysql.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 activerecord/test/support/mysql.rb (limited to 'activerecord/test/support/mysql.rb') diff --git a/activerecord/test/support/mysql.rb b/activerecord/test/support/mysql.rb new file mode 100644 index 0000000000..7a66415e64 --- /dev/null +++ b/activerecord/test/support/mysql.rb @@ -0,0 +1,11 @@ +if defined?(Mysql) + class Mysql + class Error + # This monkey patch fixes annoy warning with mysql-2.8.1.gem when executing testcases. + def errno_with_fix_warnings + silence_warnings { errno_without_fix_warnings } + end + alias_method_chain :errno, :fix_warnings + end + end +end -- cgit v1.2.3