summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-07-20 09:25:30 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-07-20 09:25:30 +0000
commit1ddd9bb55bc359fb034a1a03662ab331a0ac43dd (patch)
treec0fc6ee6d748aa3a6aa5534069be882a752c4c12 /lib
parenteb1d969237a9ed1bb41c6e10d5a9eb073f297e95 (diff)
downloadredmine-1ddd9bb55bc359fb034a1a03662ab331a0ac43dd.tar.gz
redmine-1ddd9bb55bc359fb034a1a03662ab331a0ac43dd.zip
Fixed: dependency on ruby 1.8.7 introduced in r1660 (#1643).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1679 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/menu_manager.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/redmine/menu_manager.rb b/lib/redmine/menu_manager.rb
index a3dc3ca25..f6431928e 100644
--- a/lib/redmine/menu_manager.rb
+++ b/lib/redmine/menu_manager.rb
@@ -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