 :Kernel.#p
:Kernel.#p![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :Array
:Array![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :rectangular
:rectangular![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :String
:String![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :help
:help![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :JSON
:JSON![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :lambda
:lambda![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :public_instance_method
:public_instance_method![条件を削除 [x]](/images/drop-condition-icon.png) > クラス:IO
 > クラス:IO![条件を削除 [x]](/images/drop-condition-icon.png) 
  種類
- 特異メソッド (384)
- インスタンスメソッド (84)
ライブラリ
- ビルトイン (468)
検索結果
先頭5件
- IO. popen(env = {} , [cmdname , *args , execopt={}] , mode = "r" , opt={}) {|f| . . . } -> object 
- IO. popen(env = {} , command , mode = "r" , opt={}) -> IO 
- IO. popen(env = {} , command , mode = "r" , opt={}) {|f| . . . } -> object 
- IO. popen("-" , mode = "r" , opt={}) -> IO 
- IO. popen("-" , mode = "r" , opt={}) {|io| . . . } -> object 
- 
      IO. popen(env = {} , [cmdname , *args , execopt={}] , mode = "r" , opt={}) {|f| . . . } -> object (6147.0) 
- 
      
      
      サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。 ...出力
 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。
 p io = IO.popen("cat", "r+") # => #<IO:fd 4>
 io.puts "foo"
 io.close_write
 p io.gets # => "foo\n"
 サブプロセスを指定する方法は2......生成した IO オブジェクトを引数にブ
 ロックを実行し、ブロックの実行結果を返します。ブロックの実行後、生成したパイ
 プは自動的にクローズされます。
 p IO.popen("cat", "r+") {|io|
 io.puts "foo"
 io.close_write
 io.gets
 }
 #......=> "foo\n"
 opt でプロセス起動のためのオプションや、パイプ IO オブジェクトの属性(エンコーディングや
 読み書き能力)を指定することができます。
 プロセス起動のためのオプションは Kernel.#spawn と、
 パイプオブジェクトの...
- 
      IO. popen(env = {} , command , mode = "r" , opt={}) -> IO (6147.0) 
- 
      
      
      サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。 ...出力
 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。
 p io = IO.popen("cat", "r+") # => #<IO:fd 4>
 io.puts "foo"
 io.close_write
 p io.gets # => "foo\n"
 サブプロセスを指定する方法は2......生成した IO オブジェクトを引数にブ
 ロックを実行し、ブロックの実行結果を返します。ブロックの実行後、生成したパイ
 プは自動的にクローズされます。
 p IO.popen("cat", "r+") {|io|
 io.puts "foo"
 io.close_write
 io.gets
 }
 #......=> "foo\n"
 opt でプロセス起動のためのオプションや、パイプ IO オブジェクトの属性(エンコーディングや
 読み書き能力)を指定することができます。
 プロセス起動のためのオプションは Kernel.#spawn と、
 パイプオブジェクトの...
- 
      IO. popen(env = {} , command , mode = "r" , opt={}) {|f| . . . } -> object (6147.0) 
- 
      
      
      サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。 ...出力
 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。
 p io = IO.popen("cat", "r+") # => #<IO:fd 4>
 io.puts "foo"
 io.close_write
 p io.gets # => "foo\n"
 サブプロセスを指定する方法は2......生成した IO オブジェクトを引数にブ
 ロックを実行し、ブロックの実行結果を返します。ブロックの実行後、生成したパイ
 プは自動的にクローズされます。
 p IO.popen("cat", "r+") {|io|
 io.puts "foo"
 io.close_write
 io.gets
 }
 #......=> "foo\n"
 opt でプロセス起動のためのオプションや、パイプ IO オブジェクトの属性(エンコーディングや
 読み書き能力)を指定することができます。
 プロセス起動のためのオプションは Kernel.#spawn と、
 パイプオブジェクトの...
- 
      IO. popen("-" , mode = "r" , opt={}) -> IO (6132.0) 
- 
      
      
      第一引数に文字列 "-" が指定された時、fork(2) を 行い子プロセスの標準入出力との間にパイプラインを確立します。 親プロセスでは IO オブジェクトを返し、子プロセスでは nil を返します。 ...ロセスでは IO オブジェクトを返し、子プロセスでは
 nil を返します。
 io = IO.popen("-", "r+")
 if io # parent
 io.puts "foo"
 p io.gets # => "child output: foo\n"
 io.close
 else # child
 s = gets
 print "child output: " + s
 exit...... IO オブジェクトを引数に
 ブロックを実行し、その結果を返します。ブロックの実行後、生成したパイ
 プは自動的にクローズされます。
 子プロセスでは nil を引数にブロックを実行し終了します。
 p IO.popen("-", "r+") {|io|......if io # parent
 io.puts "foo"
 io.gets
 else # child
 s = gets
 puts "child output: " + s
 end
 }
 # => "child output: foo\n"
 opt ではエンコーディングの設定やプロセス起動のためのオプションが指定できます。
 IO.new や Kernel.#spaw...
- 
      IO. popen("-" , mode = "r" , opt={}) {|io| . . . } -> object (6132.0) 
- 
      
      
      第一引数に文字列 "-" が指定された時、fork(2) を 行い子プロセスの標準入出力との間にパイプラインを確立します。 親プロセスでは IO オブジェクトを返し、子プロセスでは nil を返します。 ...ロセスでは IO オブジェクトを返し、子プロセスでは
 nil を返します。
 io = IO.popen("-", "r+")
 if io # parent
 io.puts "foo"
 p io.gets # => "child output: foo\n"
 io.close
 else # child
 s = gets
 print "child output: " + s
 exit...... IO オブジェクトを引数に
 ブロックを実行し、その結果を返します。ブロックの実行後、生成したパイ
 プは自動的にクローズされます。
 子プロセスでは nil を引数にブロックを実行し終了します。
 p IO.popen("-", "r+") {|io|......if io # parent
 io.puts "foo"
 io.gets
 else # child
 s = gets
 puts "child output: " + s
 end
 }
 # => "child output: foo\n"
 opt ではエンコーディングの設定やプロセス起動のためのオプションが指定できます。
 IO.new や Kernel.#spaw...
- 
      IO. popen(env , "-" , mode = "r" , opt={}) -> IO (6132.0) 
- 
      
      
      第一引数に文字列 "-" が指定された時、fork(2) を 行い子プロセスの標準入出力との間にパイプラインを確立します。 親プロセスでは IO オブジェクトを返し、子プロセスでは nil を返します。 ...ロセスでは IO オブジェクトを返し、子プロセスでは
 nil を返します。
 io = IO.popen("-", "r+")
 if io # parent
 io.puts "foo"
 p io.gets # => "child output: foo\n"
 io.close
 else # child
 s = gets
 print "child output: " + s
 exit...... IO オブジェクトを引数に
 ブロックを実行し、その結果を返します。ブロックの実行後、生成したパイ
 プは自動的にクローズされます。
 子プロセスでは nil を引数にブロックを実行し終了します。
 p IO.popen("-", "r+") {|io|......if io # parent
 io.puts "foo"
 io.gets
 else # child
 s = gets
 puts "child output: " + s
 end
 }
 # => "child output: foo\n"
 opt ではエンコーディングの設定やプロセス起動のためのオプションが指定できます。
 IO.new や Kernel.#spaw...
- 
      IO. popen(env , "-" , mode = "r" , opt={}) {|io| . . . } -> object (6132.0) 
- 
      
      
      第一引数に文字列 "-" が指定された時、fork(2) を 行い子プロセスの標準入出力との間にパイプラインを確立します。 親プロセスでは IO オブジェクトを返し、子プロセスでは nil を返します。 ...ロセスでは IO オブジェクトを返し、子プロセスでは
 nil を返します。
 io = IO.popen("-", "r+")
 if io # parent
 io.puts "foo"
 p io.gets # => "child output: foo\n"
 io.close
 else # child
 s = gets
 print "child output: " + s
 exit...... IO オブジェクトを引数に
 ブロックを実行し、その結果を返します。ブロックの実行後、生成したパイ
 プは自動的にクローズされます。
 子プロセスでは nil を引数にブロックを実行し終了します。
 p IO.popen("-", "r+") {|io|......if io # parent
 io.puts "foo"
 io.gets
 else # child
 s = gets
 puts "child output: " + s
 end
 }
 # => "child output: foo\n"
 opt ではエンコーディングの設定やプロセス起動のためのオプションが指定できます。
 IO.new や Kernel.#spaw...
- 
      IO# puts(*obj) -> nil (6129.0) 
- 
      
      
      各 obj を self に出力し、それぞれの後に改行を出力します。 引数の扱いは Kernel.#puts と同じです。詳細はこちらを参照し てください。 ...の後に改行を出力します。
 引数の扱いは Kernel.#puts と同じです。詳細はこちらを参照し
 てください。
 @param obj 出力したいオブジェクトを指定します。Kernel.#puts と同じです。
 @raise IOError 自身が書き込み用にオープンされて......いなければ発生します。
 @raise Errno::EXXX 出力に失敗した場合に発生します。
 $stdout.puts("this", "is", "a", "test", [1, [nil, 3]])
 
 #=>
 this
 is
 a
 test
 1
 
 3
 @see Kernel.#puts...
- 
      IO# printf(format , *arg) -> nil (6125.0) 
- 
      
      
      C 言語の printf と同じように、format に従い引数 を文字列に変換して、self に出力します。 ...語の printf と同じように、format に従い引数
 を文字列に変換して、self に出力します。
 第一引数に IO を指定できないこと、引数を省略できないことを除けば Kernel.#printf と同じです。
 @param format Kernel.#printf と同じです。print_f......ormat を参照してください。
 @param arg Kernel.#printf と同じです。
 @raise IOError 自身が書き込み用にオープンされていなければ発生します。
 @raise Errno::EXXX 出力に失敗した場合に発生します。
 @see Kernel.#printf...
