Skip to content

Commit

Permalink
Prefer the simple read/write File singleton methods
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Mar 16, 2024
1 parent d4a53b4 commit aae9f56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/ruby/test_dir_m17n.rb
Expand Up @@ -362,7 +362,7 @@ def test_glob_escape_multibyte
def test_glob_encoding
with_tmpdir do
list = %W"file_one.ext file_two.ext \u{6587 4ef6}1.txt \u{6587 4ef6}2.txt"
list.each {|f| open(f, "w") {}}
list.each {|f| File.binwrite(f, "")}
a = "file_one*".dup.force_encoding Encoding::IBM437
b = "file_two*".dup.force_encoding Encoding::EUC_JP
assert_equal([a, b].map(&:encoding), Dir[a, b].map(&:encoding))
Expand Down

0 comments on commit aae9f56

Please sign in to comment.