From 21c9bd1b33b122fafb310147e565b792d62c8241 Mon Sep 17 00:00:00 2001 From: akr Date: Fri, 29 Feb 2008 14:36:39 +0000 Subject: [PATCH] add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io_m17n.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb index dc10d1d29c..e007712db5 100644 --- a/test/ruby/test_io_m17n.rb +++ b/test/ruby/test_io_m17n.rb @@ -426,5 +426,14 @@ EOT assert_equal("\u{3042}".encode("euc-jp"), result) } end + + def test_file_foreach + with_tmpdir { + generate_file('tst', 'a' * 8191 + "\xa1\xa1") + assert_nothing_raised { + File.foreach('tst', :encoding=>"euc-jp") {|line| line.inspect } + } + } + end end