diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-02-22 08:05:51 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-02-22 08:05:51 +0000 |
commit | 11e4c5c1ea1f91d77ed14e08893b44001d0d1459 (patch) | |
tree | 342e7b7044f2d4d732df2c9e2474f2ec51553aa1 /lib/redmine/scm/adapters/mercurial_adapter.rb | |
parent | 1236e037f229e406a681f0207ea3f5534133d6c4 (diff) | |
download | redmine-11e4c5c1ea1f91d77ed14e08893b44001d0d1459.tar.gz redmine-11e4c5c1ea1f91d77ed14e08893b44001d0d1459.zip |
scm: Ruby 1.9 compatibility in getting scm version (#4273).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4920 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/scm/adapters/mercurial_adapter.rb')
-rw-r--r-- | lib/redmine/scm/adapters/mercurial_adapter.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/redmine/scm/adapters/mercurial_adapter.rb b/lib/redmine/scm/adapters/mercurial_adapter.rb index 5bcb33ea5..e8c5fe883 100644 --- a/lib/redmine/scm/adapters/mercurial_adapter.rb +++ b/lib/redmine/scm/adapters/mercurial_adapter.rb @@ -55,6 +55,9 @@ module Redmine # release number (eg 0.9.5 or 1.0) or as a revision # id composed of 12 hexa characters. theversion = hgversion_from_command_line + if theversion.respond_to?(:force_encoding) + theversion.force_encoding('ASCII-8BIT')
+ end
if m = theversion.match(%r{\A(.*?)((\d+\.)+\d+)}) m[2].scan(%r{\d+}).collect(&:to_i) end |