From a1d3bbbfa9622d62ae64b1dc06ee64ae5c96fc17 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Mon, 1 Aug 2016 19:17:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3ruby2.3=E6=89=A7=E8=A1=8Csql?= =?UTF-8?q?=E5=87=BA=E9=94=99=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/initializers/10-patches.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb index 79641513e..ff3d8de83 100644 --- a/config/initializers/10-patches.rb +++ b/config/initializers/10-patches.rb @@ -1,5 +1,15 @@ +#coding=utf-8 +# require 'active_record' +## ruby2.3在这个rails版本的activerecord有bug, 直接用respond_to?(:to_proc)作判断 +#而ruby2.3中hash可以返回 to_proc +if RUBY_VERSION > '2.3' && Rails.version < '3.2.22.3' + Hash.class_eval do + remove_method :to_proc + end +end + module ActiveRecord class Base include Redmine::I18n