fix unit test fails on JRuby 1.6.7.2 (#11577)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10207 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
3673fbd881
commit
91a09bd474
|
@ -1157,7 +1157,7 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def sanitize_anchor_name(anchor)
|
||||
if ''.respond_to?(:encoding)
|
||||
if ''.respond_to?(:encoding) || RUBY_PLATFORM == 'java'
|
||||
anchor.gsub(%r{[^\p{Word}\s\-]}, '').gsub(%r{\s+(\-+\s*)?}, '-')
|
||||
else
|
||||
# TODO: remove when ruby1.8 is no longer supported
|
||||
|
|
Loading…
Reference in New Issue