From 91a09bd474b3e33b6fbc93022911505f11419258 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 14 Aug 2012 00:30:23 +0000 Subject: [PATCH] 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 --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 68eeea6db..f80fc228e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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