summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-11-17 10:07:21 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-11-17 10:07:21 +0000
commitb3cf67cad4106c8176f7f4adcc07cedce2740cd3 (patch)
tree6a242ac4a32c756d39ea16898959136389b53ca9 /lib
parent19bd8577908f293716eca2bf0bca4d99495c4a21 (diff)
downloadredmine-b3cf67cad4106c8176f7f4adcc07cedce2740cd3.tar.gz
redmine-b3cf67cad4106c8176f7f4adcc07cedce2740cd3.zip
Makes Plugin#requires_redmine accept only major and minor version (#12299).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10826 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/plugin.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redmine/plugin.rb b/lib/redmine/plugin.rb
index 0b7a4f6e5..8bd961d4b 100644
--- a/lib/redmine/plugin.rb
+++ b/lib/redmine/plugin.rb
@@ -179,7 +179,7 @@ module Redmine #:nodoc:
raise PluginRequirementError.new("#{id} plugin requires Redmine #{v} or higher but current is #{current.join('.')}")
end
when :version
- unless versions.include?(current.slice(0,3))
+ unless versions.detect {|ver| current.slice(0, ver.size) == ver}
raise PluginRequirementError.new("#{id} plugin requires one the following Redmine versions: #{v.join(', ')} but current is #{current.join('.')}")
end
end