Fixes that Redmine::WikiFormatting.register did not raise ArgumentError when giving name as a string (#2856).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2562 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2009-03-07 12:57:16 +00:00
parent e67fbdc315
commit 8375e98ade
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ module Redmine
end
def register(name, formatter, helper)
raise ArgumentError, "format name '#{name}' is already taken" if @@formatters[name]
raise ArgumentError, "format name '#{name}' is already taken" if @@formatters[name.to_sym]
@@formatters[name.to_sym] = {:formatter => formatter, :helper => helper}
end