]> source.dussan.org Git - redmine.git/commitdiff
Fixed: dependency on ruby 1.8.7 introduced in r1660 (#1643).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 20 Jul 2008 09:25:30 +0000 (09:25 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 20 Jul 2008 09:25:30 +0000 (09:25 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1679 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/menu_manager.rb

index a3dc3ca25370101e3ae879fd41ebd8668a61de31..f6431928ef1ed3eb11e2ea0e8a2f0e63841a75d9 100644 (file)
@@ -130,9 +130,9 @@ module Redmine
         
         # menu item position
         if before = options.delete(:before)
-          position = @menu_items.index {|i| i.name == before}
+          position = @menu_items.collect(&:name).index(before)
         elsif after = options.delete(:after)
-          position = @menu_items.index {|i| i.name == after}
+          position = @menu_items.collect(&:name).index(after)
           position += 1 unless position.nil?
         elsif options.delete(:last)
           position = @menu_items.size