diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-11-21 16:20:17 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-11-21 22:16:49 +0900 |
commit | 612aa5c24a7c249867bbcd7d6567012aa6a7f4b9 (patch) | |
tree | 35581bf73b35123b08cc2ac9c9f453ab0010ff69 /tool/enc-case-folding.rb | |
parent | 116920cff8739c49ba469bf243252f503e28f0fd (diff) | |
download | ruby-612aa5c24a7c249867bbcd7d6567012aa6a7f4b9.tar.gz |
Use class methods of `File` over `Kernel.open` and `IO.read`
Diffstat (limited to 'tool/enc-case-folding.rb')
-rwxr-xr-x | tool/enc-case-folding.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tool/enc-case-folding.rb b/tool/enc-case-folding.rb index 6d43a27df8..76c6b5c48b 100755 --- a/tool/enc-case-folding.rb +++ b/tool/enc-case-folding.rb @@ -409,9 +409,7 @@ if $0 == __FILE__ s = f.string end if dest - open(dest, "wb") do |file| - file.print(s) - end + File.binwrite(dest, s) else STDOUT.print(s) end |