##// END OF EJS Templates
fix unit test fails on JRuby 1.6.7.2 (#11577)...
Toshi MARUYAMA -
r10024:91a09bd474b3
parent child
Show More
@@ -1157,7 +1157,7 module ApplicationHelper
1157 end
1157 end
1158
1158
1159 def sanitize_anchor_name(anchor)
1159 def sanitize_anchor_name(anchor)
1160 if ''.respond_to?(:encoding)
1160 if ''.respond_to?(:encoding) || RUBY_PLATFORM == 'java'
1161 anchor.gsub(%r{[^\p{Word}\s\-]}, '').gsub(%r{\s+(\-+\s*)?}, '-')
1161 anchor.gsub(%r{[^\p{Word}\s\-]}, '').gsub(%r{\s+(\-+\s*)?}, '-')
1162 else
1162 else
1163 # TODO: remove when ruby1.8 is no longer supported
1163 # TODO: remove when ruby1.8 is no longer supported
General Comments 0
You need to be logged in to leave comments. Login now