Commit 91100398 authored by Akira Yumiyama's avatar Akira Yumiyama

add Kernel#open

parent 5a425f59
module Kernel
def open(file, *rest)
raise ArgumentError unless file.is_a?(String)
if file[0] == "|"
IO.popen(file[1..-1], *rest)
else
File.open(file, *rest)
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment