Fixed that #reload raises a Stack too deep error with ruby 2.0.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11497 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2013-02-28 18:47:25 +00:00
parent f544dd682b
commit 5c1e1ee4bb
4 changed files with 8 additions and 5 deletions
+2 -1
View File
@@ -184,11 +184,12 @@ class Issue < ActiveRecord::Base
super
end
alias :base_reload :reload
def reload(*args)
@workflow_rule_by_attribute = nil
@assignable_versions = nil
@relations = nil
super
base_reload(*args)
end
# Overrides Redmine::Acts::Customizable::InstanceMethods#available_custom_fields
+2 -1
View File
@@ -285,6 +285,7 @@ class Project < ActiveRecord::Base
self.find(*args)
end
alias :base_reload :reload
def reload(*args)
@shared_versions = nil
@rolled_up_versions = nil
@@ -297,7 +298,7 @@ class Project < ActiveRecord::Base
@actions_allowed = nil
@start_date = nil
@due_date = nil
super
base_reload(*args)
end
def to_param
+2 -1
View File
@@ -128,10 +128,11 @@ class User < Principal
end
end
alias :base_reload :reload
def reload(*args)
@name = nil
@projects_by_role = nil
super
base_reload(*args)
end
def mail=(arg)