Skip to content

Commit

Permalink
fix unit test fails on JRuby 1.6.7.2 (#11577)
Browse files Browse the repository at this point in the history
git-svn-id: svn://rubyforge.org/var/svn/redmine/trunk@10207 e93f8b46-1217-0410-a6f0-8f06a7374b81
  • Loading branch information
tmaruyama committed Aug 14, 2012
1 parent 1c46bb2 commit ce83d8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,7 @@ def avatar(user, options = { })
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
Expand Down

0 comments on commit ce83d8e

Please sign in to comment.