55件ヒット
[1-55件を表示]
(0.082秒)
検索結果
先頭5件
-
JSON
. # dump(object , io = nil , limit = nil) -> String | IO (18132.0) -
与えられたオブジェクトを JSON 形式の文字列に変換してダンプします。
...ist[例][ruby]{
require "json"
JSON.dump({ name: "tanaka", age: 19 }) # => "{\"name\":\"tanaka\",\"age\":19}"
//}
//emlist[例][ruby]{
require "json"
File.open("test.txt", "w") do |f|
JSON.dump([[[[[[[[[[]]]]]]]]]], f, 10) # => #<File:test.txt>
JSON.dump([[[[[[[[[[[]]]]]]]]]]], f, 10) # =>......exceed depth limit (ArgumentError)
end
//}
@see Marshal, Marshal.#dump... -
Kernel
. # spawn(env , program , *args , options={}) -> Integer (79.0) -
引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。
...イル名文字列, モード文字列]
open(ファイル名, モード, 0644) でファイルを開いてリダイレクト
します。
* [リダイレクト先のファイル名文字列, モード文字列, パーミション(整数)]
open(ファイル名, モード, パーミッ......時的に子プロセスの core dump を止める
pid = spawn(command, :rlimit_core=>[0,max]) # disable core temporary.
# 子プロセスで core dump を出せるようにする
pid = spawn(command, :rlimit_core=>max) # enable core dump
# 子プロセスで core dump を出せなくする
pid = sp......awn(command, :rlimit_core=>0) # never dump core.
//}
「:chdir」で子プロセスのカレントディレクトリを変更できます。
//emlist[][ruby]{
pid = spawn(command, :chdir=>"/var/tmp")
//}
「:umask」で子プロセスの umask を指定できます。
//emlist[][ruby]{
pid = spawn... -
Kernel
. # spawn(program , *args) -> Integer (79.0) -
引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。
...イル名文字列, モード文字列]
open(ファイル名, モード, 0644) でファイルを開いてリダイレクト
します。
* [リダイレクト先のファイル名文字列, モード文字列, パーミション(整数)]
open(ファイル名, モード, パーミッ......時的に子プロセスの core dump を止める
pid = spawn(command, :rlimit_core=>[0,max]) # disable core temporary.
# 子プロセスで core dump を出せるようにする
pid = spawn(command, :rlimit_core=>max) # enable core dump
# 子プロセスで core dump を出せなくする
pid = sp......awn(command, :rlimit_core=>0) # never dump core.
//}
「:chdir」で子プロセスのカレントディレクトリを変更できます。
//emlist[][ruby]{
pid = spawn(command, :chdir=>"/var/tmp")
//}
「:umask」で子プロセスの umask を指定できます。
//emlist[][ruby]{
pid = spawn... -
Kernel
. # spawn(command , options={}) -> Integer (14.0) -
引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。
引数を外部コマンドとして実行しますが、生成した
子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。
=== 引数の解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます。
@param command コマンドを文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash... -
Kernel
. # spawn(env , command , options={}) -> Integer (14.0) -
引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。
引数を外部コマンドとして実行しますが、生成した
子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。
=== 引数の解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます。
@param command コマンドを文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash...