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:
parent
e67fbdc315
commit
8375e98ade
|
@ -25,7 +25,7 @@ module Redmine
|
||||||
end
|
end
|
||||||
|
|
||||||
def register(name, formatter, helper)
|
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}
|
@@formatters[name.to_sym] = {:formatter => formatter, :helper => helper}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue