Apply PIE to nghttpx
[platform/upstream/nghttp2.git] / third-party / mruby / mrbgems / mruby-io / mrblib / kernel.rb
1 module Kernel
2   def `(cmd)
3     IO.popen(cmd) { |io| io.read }
4   end
5
6   def open(file, *rest, &block)
7     raise ArgumentError unless file.is_a?(String)
8
9     if file[0] == "|"
10       IO.popen(file[1..-1], *rest, &block)
11     else
12       File.open(file, *rest, &block)
13     end
14   end
15 end