[前][次][番号順一覧][スレッド一覧]

ruby-changes:67112

From: Nobuyoshi <ko1@a...>
Date: Wed, 11 Aug 2021 10:54:55 +0900 (JST)
Subject: [ruby-changes:67112] c3964a313e (master): Assert for duplicated ARGF [Bug #18074]

https://git.ruby-lang.org/ruby.git/commit/?id=c3964a313e

From c3964a313eaf8ba8ebaef36bf3c3a5df599fca34 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Tue, 10 Aug 2021 22:06:43 +0900
Subject: Assert for duplicated ARGF [Bug #18074]

---
 test/ruby/test_argf.rb | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/test/ruby/test_argf.rb b/test/ruby/test_argf.rb
index 3c9b1c6..e3bd1cd 100644
--- a/test/ruby/test_argf.rb
+++ b/test/ruby/test_argf.rb
@@ -1121,5 +1121,12 @@ class TestArgf < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_argf.rb#L1121
     ruby('-e', "print ARGF.read(3)", @t1.path, @t2.path, @t3.path) do |f|
       assert_equal("abc", f.read)
     end
+
+    argf = ARGF.class.new(@t1.path, @t2.path, @t3.path)
+    begin
+      assert_equal("abc", argf.read(3))
+    ensure
+      argf.close
+    end
   end
 end
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]