[DRE-commits] [ruby-fast-gettext] 05/10: Add a patch to stop using the deprecated IO#lines

Jérémy Bobbio lunar at moszumanska.debian.org
Sat Sep 12 19:15:36 UTC 2015


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch master
in repository ruby-fast-gettext.

commit 0a4d3fc2235746287e9d3d0b5268b4a2f8b9e803
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Sat Sep 12 20:55:47 2015 +0200

    Add a patch to stop using the deprecated IO#lines
---
 ...each_line-instead-of-IO-lines-in-poparser.patch | 22 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 23 insertions(+)

diff --git a/debian/patches/0006-Use-IO-each_line-instead-of-IO-lines-in-poparser.patch b/debian/patches/0006-Use-IO-each_line-instead-of-IO-lines-in-poparser.patch
new file mode 100644
index 0000000..d02f774
--- /dev/null
+++ b/debian/patches/0006-Use-IO-each_line-instead-of-IO-lines-in-poparser.patch
@@ -0,0 +1,22 @@
+From: =?utf-8?q?J=C3=A9r=C3=A9my_Bobbio?= <lunar at debian.org>
+Date: Sat, 12 Sep 2015 20:54:22 +0200
+Subject: Use IO#each_line instead of IO#lines in poparser
+
+IO#lines is deprecated and gives us a quite obnoxious deprecation warning.
+---
+ lib/fast_gettext/vendor/poparser.rb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/fast_gettext/vendor/poparser.rb b/lib/fast_gettext/vendor/poparser.rb
+index 0b18880..27de150 100644
+--- a/lib/fast_gettext/vendor/poparser.rb
++++ b/lib/fast_gettext/vendor/poparser.rb
+@@ -144,7 +144,7 @@ module GetText
+ 
+   def detect_file_encoding(po_file)
+     open(po_file, :encoding => 'ASCII-8BIT') do |input|
+-      input.lines.each do |line|
++      input.each_line.each do |line|
+         return Encoding.find($1) if %r["Content-Type:.*\scharset=(.*)\\n"] =~ line
+       end
+     end
diff --git a/debian/patches/series b/debian/patches/series
index 2f90d94..9e27a10 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 0003-fix-tests-with-ruby-calls.patch
 0004-Properly-handle-PO-files-encoding-in-PoFile.to_mo_fi.patch
 0005-remove-bogus-tests.patch
+0006-Use-IO-each_line-instead-of-IO-lines-in-poparser.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-fast-gettext.git



More information about the Pkg-ruby-extras-commits mailing list