[DRE-commits] [SCM] ruby-locale.git branch, master, updated. debian/2.0.5-5-20-g147ad5d
Hleb Valoshka
375GNU at Gmail.COM
Mon Apr 1 18:45:21 UTC 2013
The following commit has been merged in the master branch:
commit 147ad5d0a9feaacfdb0fdc85304f9e929bc19d6a
Author: Hleb Valoshka <375GNU at Gmail.COM>
Date: Mon Apr 1 21:42:01 2013 +0300
better patch 0001-fix-bugs-with-charset-handling
diff --git a/debian/patches/0001-fix-bugs-with-charset-handling.patch b/debian/patches/0001-fix-bugs-with-charset-handling.patch
index 7a5465a..b1a7245 100644
--- a/debian/patches/0001-fix-bugs-with-charset-handling.patch
+++ b/debian/patches/0001-fix-bugs-with-charset-handling.patch
@@ -1,61 +1,12 @@
From: Hleb Valoshka <375GNU at Gmail.COM>
-Date: Sun, 31 Mar 2013 18:37:58 +0300
+Date: Mon, 1 Apr 2013 21:39:49 +0300
Subject: fix bugs with charset handling
Fixes #520181
---
- lib/locale/tag/posix.rb | 23 ++++++++++++++++-------
- lib/locale/taglist.rb | 6 +-----
- 2 files changed, 17 insertions(+), 12 deletions(-)
+ lib/locale/taglist.rb | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
-diff --git a/lib/locale/tag/posix.rb b/lib/locale/tag/posix.rb
-index b04aa54..1ce944a 100644
---- a/lib/locale/tag/posix.rb
-+++ b/lib/locale/tag/posix.rb
-@@ -30,9 +30,9 @@ module Locale
- end
-
- def self.parse(tag)
-- if tag =~ /^(C|POSIX)$/
-- ret = self.new("en", "US")
-- ret.tag = tag
-+ if tag =~ /\A(C|POSIX)(?:\.([^@]+))?\Z/
-+ ret = self.new("en", "US", $2)
-+ ret.tag = $1
- ret
- elsif tag =~ TAG_RE
- ret = self.new($1, $2, $3, $4)
-@@ -47,10 +47,15 @@ module Locale
- # <language>_<COUNTRY>.<CHARSET>@<MODIFIER>
- # (e.g.) "ja_JP.EUC-JP at Modifier"
- def to_s
-- s = @language.dup
-- s << "_#{@region}" if @region
-- s << ".#{@charset}" if @charset
-- s << "@#{@modifier}" if @modifier
-+ if posix?
-+ s = tag.dup
-+ s << ".#{@charset}" if @charset
-+ else
-+ s = @language.dup
-+ s << "_#{@region}" if @region
-+ s << ".#{@charset}" if @charset
-+ s << "@#{@modifier}" if @modifier
-+ end
- s
- end
-
-@@ -92,6 +97,10 @@ module Locale
- end
- end
-
-+ def posix?
-+ ['POSIX', 'C'].include? tag
-+ end
-+
- end
- end
- end
diff --git a/lib/locale/taglist.rb b/lib/locale/taglist.rb
index e5d879c..2b6c8e7 100644
--- a/lib/locale/taglist.rb
--
ruby-locale.git
More information about the Pkg-ruby-extras-commits
mailing list