mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-23 17:01:13 +00:00
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
|
end
|
||||||
|
|
||||||
def sanitize_anchor_name(anchor)
|
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*)?}, '-')
|
anchor.gsub(%r{[^\p{Word}\s\-]}, '').gsub(%r{\s+(\-+\s*)?}, '-')
|
||||||
else
|
else
|
||||||
# TODO: remove when ruby1.8 is no longer supported
|
# TODO: remove when ruby1.8 is no longer supported
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user