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