Actions
Patch #2856
closedRedmine::WikiFormatting.register not raise ArgumentError
Start date:
2009-02-27
Due date:
% Done:
0%
Estimated time:
Description
Hi.
Redmine::WikiFormatting.register not raise ArgumentError.
./script/console
001:>> Redmine::WikiFormatting.register("foo", "bar", "baz") #=> {:helper=>"baz", :formatter=>"bar"}
002:>> Redmine::WikiFormatting.register("foo", "bar", "baz") #=> {:helper=>"baz", :formatter=>"bar"}
003:>> Redmine::WikiFormatting.register("foo", "bar", "baz") #=> {:helper=>"baz", :formatter=>"bar"}
I maked patch for fix this bug.
./script/console
001:>Redmine::WikiFormatting.register("foo", "bar", "baz") #=> {:helper=>"baz", :formatter=>"bar"}
002:>> Redmine::WikiFormatting.register("foo", "bar", "baz")
ArgumentError: format name 'foo' is already taken
thanks.
Index: lib/redmine/wiki_formatting.rb =================================================================== --- lib/redmine/wiki_formatting.rb (revision 2480) +++ lib/redmine/wiki_formatting.rb (working copy) @@ -25,7 +25,7 @@ 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
Updated by Jean-Philippe Lang over 15 years ago
- Status changed from New to Closed
- Target version set to 0.9.0
Applied in r2562. Thanks.
Actions