mirror of
https://github.com/redmine/redmine.git
synced 2025-11-14 09:16:02 +01:00
Use Object#tap instead of #returning (#6887).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4406 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -154,7 +154,7 @@ module CollectiveIdea #:nodoc:
|
||||
def each_root_valid?(roots_to_validate)
|
||||
left = right = 0
|
||||
roots_to_validate.all? do |root|
|
||||
returning(root.left > left && root.right > right) do
|
||||
(root.left > left && root.right > right).tap do
|
||||
left = root.left
|
||||
right = root.right
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user