368件ヒット
[1-100件を表示]
(0.038秒)
クラス
- Random (52)
キーワード
-
$ DEFAULT _ INPUT (11) -
$ DEFAULT _ OUTPUT (11) - DefaultLoader (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (9) -
NEWS for Ruby 2
. 4 . 0 (8) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) - Rubyの起動 (11)
- Ruby用語集 (11)
-
arg
_ config (11) -
dir
_ config (11) -
enable
_ config (22) - irb (11)
-
open
_ uri (22) - rand (43)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 4 feature (11) - spawn (44)
- srand (40)
-
with
_ config (22) - クラス/メソッドの定義 (11)
検索結果
先頭5件
-
Random
:: DEFAULT -> Random (18113.0) -
Ruby 3.0 から非推奨です。代わりに Random クラスオブジェクトを擬似乱数生成器として使用してください。
...Ruby 3.0 から非推奨です。代わりに Random クラスオブジェクトを擬似乱数生成器として使用してください。
デフォルトの擬似乱数生成器です。
Random.rand や Kernel.#rand などで使用されます。
@see Random.srand, Kernel.#srand... -
Kernel
$ $ DEFAULT _ OUTPUT -> IO (15125.0) -
$> の別名
...$> の別名
require "English"
dout = $DEFAULT_OUTPUT.dup
$DEFAULT_OUTPUT.reopen("out.txt", "w")
print "foo"
$DEFAULT_OUTPUT.close
$DEFAULT_OUTPUT = dout
p "bar" # => bar
p File.read("out.txt") #=> foo... -
Kernel
$ $ DEFAULT _ INPUT -> IO (15107.0) -
$< の別名
...$< の別名
require "English"
while line = $DEFAULT_INPUT.gets
p line
end
# end of sample.rb
ruby sample.rb < /etc/passwd
# => "hoge:x:500:501::/home/hoge:/bin/bash\n"
...... -
Kernel
# enable _ config(config , default) {|config , default| . . . } -> bool | String (9215.0) -
configure のオプションを検査します。
...します。どちらでもな
い場合は default を返します。
これはデバッグ情報などのカスタム定義を、追加するのに役立ちます。
@param config configure のオプションの名前を指定します。
@param default デフォルト値を返します。
例... -
Kernel
# with _ config(config , default = nil) {|config , default| . . . } -> bool | String (9215.0) -
configure のオプションを検査します。
...します。どちらでもない場
合は default を返します。
これはデバッグ情報などのカスタム定義を、追加するのに役立ちます。
@param config configure のオプションの名前を指定します。
@param default デフォルト値を返します。
例... -
Kernel
# dir _ config(target , idefault = nil , ldefault = nil) -> [String , String] (9200.0) -
configure オプション --with-TARGET-dir, --with-TARGET-include, --with-TARGET-lib をユーザが extconf.rb に指定できるようにします。
...ます。
@param target ターゲットの名前を指定します。
@param idefault システム標準ではないヘッダファイルのディレクトリのデフォルト値を指定します。
@param ldefault システム標準ではないライブラリのディレクトリのデフォ... -
Kernel
# arg _ config(config , default) { . . . } -> object | String | true | nil (9119.0) -
configure オプション --config の値を返します。
...指定します。
@param default 引数 config で指定したオプションのデフォルト値を指定します。
@return オプションが指定されてた場合は true を、指定されなかった場合は
nil を返します。
引数 default、あるいはブロッ......クを指定すると、オプションが指定さ
れていない場合に引数 default の値かブロックの評価結果を返します
(両方指定した場合はブロックが優先されます)。
オプションに引数が指定されていた場合は指定し... -
Kernel
# enable _ config(config , default) -> bool | String (9115.0) -
configure のオプションを検査します。
...します。どちらでもな
い場合は default を返します。
これはデバッグ情報などのカスタム定義を、追加するのに役立ちます。
@param config configure のオプションの名前を指定します。
@param default デフォルト値を返します。
例... -
Kernel
# with _ config(config , default = nil) -> bool | String (9115.0) -
configure のオプションを検査します。
...します。どちらでもない場
合は default を返します。
これはデバッグ情報などのカスタム定義を、追加するのに役立ちます。
@param config configure のオプションの名前を指定します。
@param default デフォルト値を返します。
例... -
Kernel
. # srand -> Integer (9034.0) -
Kernel.#rand や Random.rand で使用される擬似乱数生成器の種を設定し、古い種を返します。
...
Kernel.#rand や Random.rand で使用される擬似乱数生成器の種を設定し、古い種を返します。
seed に整数を指定するとその絶対値を乱数の種に設定します。
それ以外の値を指定した場合は seed.to_int が指定されたものとして扱いま......す。
seed に既知の値を与えると、以前の Kernel.#rand の値を再現できます。
seed が省略された時には
現在の時刻やプロセス ID、srand を呼び出した回数、
また可能なら /dev/urandom から読み出したデータなどを元に種を作ります......) #=> 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...