From 71aac2e3fe47ceeafa1c6a50aa8025093af4d33f Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 3 Mar 2011 05:32:33 +0000 Subject: [PATCH] scm: fix unit tests fails in Ruby 1.9. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4992 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/bazaar_adapter.rb | 2 +- lib/redmine/scm/adapters/cvs_adapter.rb | 2 +- lib/redmine/scm/adapters/darcs_adapter.rb | 2 +- lib/redmine/scm/adapters/git_adapter.rb | 2 +- lib/redmine/scm/adapters/mercurial_adapter.rb | 2 +- lib/redmine/scm/adapters/subversion_adapter.rb | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/redmine/scm/adapters/bazaar_adapter.rb b/lib/redmine/scm/adapters/bazaar_adapter.rb index 92a1d693d..b39150de8 100644 --- a/lib/redmine/scm/adapters/bazaar_adapter.rb +++ b/lib/redmine/scm/adapters/bazaar_adapter.rb @@ -43,7 +43,7 @@ module Redmine end def scm_command_version - scm_version = scm_version_from_command_line + scm_version = scm_version_from_command_line.dup if scm_version.respond_to?(:force_encoding) scm_version.force_encoding('ASCII-8BIT') end diff --git a/lib/redmine/scm/adapters/cvs_adapter.rb b/lib/redmine/scm/adapters/cvs_adapter.rb index 762e5c68d..a557199a3 100644 --- a/lib/redmine/scm/adapters/cvs_adapter.rb +++ b/lib/redmine/scm/adapters/cvs_adapter.rb @@ -43,7 +43,7 @@ module Redmine end def scm_command_version - scm_version = scm_version_from_command_line + scm_version = scm_version_from_command_line.dup if scm_version.respond_to?(:force_encoding) scm_version.force_encoding('ASCII-8BIT') end diff --git a/lib/redmine/scm/adapters/darcs_adapter.rb b/lib/redmine/scm/adapters/darcs_adapter.rb index 9b79e653f..928643887 100644 --- a/lib/redmine/scm/adapters/darcs_adapter.rb +++ b/lib/redmine/scm/adapters/darcs_adapter.rb @@ -43,7 +43,7 @@ module Redmine end def darcs_binary_version - darcsversion = darcs_binary_version_from_command_line + darcsversion = darcs_binary_version_from_command_line.dup if darcsversion.respond_to?(:force_encoding) darcsversion.force_encoding('ASCII-8BIT') end diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb index 6ad7426c3..6d2c34ac8 100644 --- a/lib/redmine/scm/adapters/git_adapter.rb +++ b/lib/redmine/scm/adapters/git_adapter.rb @@ -48,7 +48,7 @@ module Redmine end def scm_command_version - scm_version = scm_version_from_command_line + scm_version = scm_version_from_command_line.dup if scm_version.respond_to?(:force_encoding) scm_version.force_encoding('ASCII-8BIT') end diff --git a/lib/redmine/scm/adapters/mercurial_adapter.rb b/lib/redmine/scm/adapters/mercurial_adapter.rb index c60eb99e3..a0f1db195 100644 --- a/lib/redmine/scm/adapters/mercurial_adapter.rb +++ b/lib/redmine/scm/adapters/mercurial_adapter.rb @@ -54,7 +54,7 @@ module Redmine # The hg version is expressed either as a # release number (eg 0.9.5 or 1.0) or as a revision # id composed of 12 hexa characters. - theversion = hgversion_from_command_line + theversion = hgversion_from_command_line.dup if theversion.respond_to?(:force_encoding) theversion.force_encoding('ASCII-8BIT') end diff --git a/lib/redmine/scm/adapters/subversion_adapter.rb b/lib/redmine/scm/adapters/subversion_adapter.rb index 9f1ccf7ac..1fad6e3fa 100644 --- a/lib/redmine/scm/adapters/subversion_adapter.rb +++ b/lib/redmine/scm/adapters/subversion_adapter.rb @@ -44,7 +44,7 @@ module Redmine end def svn_binary_version - scm_version = scm_version_from_command_line + scm_version = scm_version_from_command_line.dup if scm_version.respond_to?(:force_encoding) scm_version.force_encoding('ASCII-8BIT') end