Skip to content

Commit 13bdd76

Browse files
committed
Use class methods of File over Kernel.open
1 parent f21910f commit 13bdd76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/un.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def wait_writable
256256
wait = (wait = options[:w]) ? Float(wait) : 0.2
257257
argv.each do |file|
258258
begin
259-
open(file, "r+b")
259+
File.open(file, "r+b")
260260
rescue Errno::ENOENT
261261
break
262262
rescue Errno::EACCES => e
@@ -422,7 +422,7 @@ def help(argv, output: $stdout)
422422
messages = {}
423423
store = proc {|msg| messages[cmd] = msg}
424424
end
425-
open(__FILE__) do |me|
425+
File.open(__FILE__) do |me|
426426
while me.gets("##\n")
427427
if help = me.gets("\n\n")
428428
if all or argv.include?(cmd = help[/^#\s*ruby\s.*-e\s+(\w+)/, 1])

0 commit comments

Comments
 (0)