るりまサーチ

最速Rubyリファレンスマニュアル検索!
202件ヒット [101-200件を表示] (0.017秒)
トップページ > クエリ:default[x] > 種類:モジュール関数[x]

別のキーワード

  1. uri default_port
  2. _builtin default
  3. socket ai_default
  4. generic default_port
  5. socket ip_default_multicast_ttl

ライブラリ

モジュール

キーワード

検索結果

<< < 1 2 3 > >>

Kernel.#rand(max = 0) -> Integer | Float (7.0)

擬似乱数を発生させます。

...l を返します。

まだ Kernel.#srand が呼ばれていなければ自動的に呼び出します。

擬似乱数生成器として Random::DEFAULT を使用します。
これは Random.rand と共通です。

@param max 乱数値の上限を正の整数で指定します。...

Kernel.#rand(range) -> Integer | Float | nil (7.0)

擬似乱数を発生させます。

...l を返します。

まだ Kernel.#srand が呼ばれていなければ自動的に呼び出します。

擬似乱数生成器として Random::DEFAULT を使用します。
これは Random.rand と共通です。

@param max 乱数値の上限を正の整数で指定します。...

Kernel.#spawn(env, program, *args, options={}) -> Integer (7.0)

引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。

...自動的に
閉じられることに注意してください。

//emlist[][ruby]{
pid = spawn(command, :close_others=>true) # close 3,4,5,... (default)
pid = spawn(command, :close_others=>false) # don't close 3,4,5,...
//}

これを利用して spawn を IO.popen のように使うことがで...
...//emlist[][ruby]{
pid = spawn(command, :close_others=>true) # close 3,4,5,...
pid = spawn(command, :close_others=>false) # don't close 3,4,5,... (default)
//}

これを利用して spawn を IO.popen のように使うことができます。
//emlist[][ruby]{
# similar to r = IO.popen(command)
r,...

Kernel.#spawn(program, *args) -> Integer (7.0)

引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。

...自動的に
閉じられることに注意してください。

//emlist[][ruby]{
pid = spawn(command, :close_others=>true) # close 3,4,5,... (default)
pid = spawn(command, :close_others=>false) # don't close 3,4,5,...
//}

これを利用して spawn を IO.popen のように使うことがで...
...//emlist[][ruby]{
pid = spawn(command, :close_others=>true) # close 3,4,5,...
pid = spawn(command, :close_others=>false) # don't close 3,4,5,... (default)
//}

これを利用して spawn を IO.popen のように使うことができます。
//emlist[][ruby]{
# similar to r = IO.popen(command)
r,...

Kernel.#srand -> Integer (7.0)

Kernel.#rand や Random.rand で使用される擬似乱数生成器の種を設定し、古い種を返します。

...) #=> 0.938911141393347
p rand(0) #=> 0.915824970865251

seeds << srand(num)

p rand(6) #=> 3
p rand(6) #=> 0
p rand(0) #=> 0.445804380918972
p rand(0) #=> 0.422248634121701

seeds << srand

p seeds #=> [455675, 2995620310703489221660585195204777696, 455675]
//}

@see Kernel.#rand, Random::DEFAULT...

絞り込み条件を変える

Kernel.#srand(seed) -> Integer (7.0)

Kernel.#rand や Random.rand で使用される擬似乱数生成器の種を設定し、古い種を返します。

...) #=> 0.938911141393347
p rand(0) #=> 0.915824970865251

seeds << srand(num)

p rand(6) #=> 3
p rand(6) #=> 0
p rand(0) #=> 0.445804380918972
p rand(0) #=> 0.422248634121701

seeds << srand

p seeds #=> [455675, 2995620310703489221660585195204777696, 455675]
//}

@see Kernel.#rand, Random::DEFAULT...

Marshal.#dump(obj, limit = -1) -> String (7.0)

obj を指定された出力先に再帰的に出力します。

...を間接的に指していることになります。

//emlist[例][ruby]{
p Marshal.dump(Hash.new {})
# => -:1:in `dump': cannot dump hash with default proc (TypeError)
//}

マーシャルの動作を任意に定義することもできます。

@param obj ダンプする対象のオブジェ...

Marshal.#dump(obj, port, limit = -1) -> IO (7.0)

obj を指定された出力先に再帰的に出力します。

...を間接的に指していることになります。

//emlist[例][ruby]{
p Marshal.dump(Hash.new {})
# => -:1:in `dump': cannot dump hash with default proc (TypeError)
//}

マーシャルの動作を任意に定義することもできます。

@param obj ダンプする対象のオブジェ...

Kernel.#spawn(command, options={}) -> Integer (2.0)

引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。

引数を外部コマンドとして実行しますが、生成した
子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。


=== 引数の解釈

この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます。


@param command コマンドを文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash...

Kernel.#spawn(env, command, options={}) -> Integer (2.0)

引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。

引数を外部コマンドとして実行しますが、生成した
子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。


=== 引数の解釈

この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます。


@param command コマンドを文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash...

絞り込み条件を変える

<< < 1 2 3 > >>