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

ruby-changes:73891

From: Nobuyoshi <ko1@a...>
Date: Fri, 7 Oct 2022 12:12:25 +0900 (JST)
Subject: [ruby-changes:73891] a87de5e3c1 (master): [ruby/rdoc] Special characters are prohibited as filename on Windows

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

From a87de5e3c111a1af92fbfd877d0ad8050444f3fa Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Fri, 7 Oct 2022 11:38:21 +0900
Subject: [ruby/rdoc] Special characters are prohibited as filename on Windows

https://github.com/ruby/rdoc/commit/13b9da5932
---
 test/rdoc/test_rdoc_generator_darkfish.rb | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/test/rdoc/test_rdoc_generator_darkfish.rb b/test/rdoc/test_rdoc_generator_darkfish.rb
index 140cf0916b..6aecde5287 100644
--- a/test/rdoc/test_rdoc_generator_darkfish.rb
+++ b/test/rdoc/test_rdoc_generator_darkfish.rb
@@ -234,7 +234,16 @@ class TestRDocGeneratorDarkfish < RDoc::TestCase https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_generator_darkfish.rb#L234
   end
 
   def test_generated_filename_with_html_tag
-    @store.add_file '"><em>should be escaped'
+    filename = '"><em>should be escaped'
+    begin # in @tmpdir
+      File.write(filename, '')
+    rescue SystemCallError
+      # ", <, > chars are prohibited as filename
+      return
+    else
+      File.unlink(filename)
+    end
+    @store.add_file filename
     doc = @store.all_files.last
     doc.parser = RDoc::Parser::Simple
 
-- 
cgit v1.2.1


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

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