ライブラリ
- ビルトイン (721)
- delegate (12)
- digest (12)
- e2mmap (6)
-
irb
/ cmd / load (12) -
irb
/ xmp (12) - json (24)
-
minitest
/ unit (1) - mkmf (612)
- open-uri (24)
- openssl (24)
- pathname (12)
- pp (12)
- psych (24)
- rake (36)
-
rubygems
/ custom _ require (12) - scanf (12)
- shell (12)
-
shell
/ command-processor (12) -
shell
/ filter (12) - stringio (72)
- timeout (8)
- un (72)
- zlib (48)
クラス
-
ARGF
. class (75) - Array (48)
- BasicObject (24)
- Binding (12)
- Exception (24)
- IO (84)
-
IRB
:: ExtendCommand :: Load (12) - LoadError (12)
- Module (132)
- Object (144)
-
OpenSSL
:: BN (12) - Shell (12)
-
Shell
:: CommandProcessor (12) -
Shell
:: Filter (12) - String (72)
- StringIO (72)
- SystemExit (12)
- Thread (72)
- TracePoint (12)
- UncaughtThrowError (22)
-
Zlib
:: GzipWriter (48)
モジュール
- Exception2MessageMapper (6)
- Kernel (836)
-
MiniTest
:: Assertions (1) -
OpenSSL
:: Buffering (12) -
OpenURI
:: OpenRead (24)
キーワード
- % (12)
- DelegateClass (12)
- Digest (12)
- JSON (12)
- Pathname (12)
- [] (18)
-
add
_ trace _ func (12) - ancestors (12)
- autoload (12)
-
cc
_ command (12) -
check
_ signedness (24) -
check
_ sizeof (24) - class (12)
-
class
_ eval (24) -
const
_ defined? (12) - constants (12)
-
convertible
_ int (24) - cp (12)
-
create
_ makefile (12) -
create
_ tmpsrc (12) -
defined
_ class (12) -
depend
_ rules (12) - desc (12)
-
egrep
_ cpp (24) - eval (12)
- exception (24)
- execute (12)
- exit (12)
-
find
_ executable (12) -
find
_ header (12) -
find
_ library (24) -
find
_ type (24) - freeze (12)
- gets (27)
-
have
_ header (24) -
have
_ macro (24) -
have
_ struct _ member (24) -
have
_ type (24) - help (12)
- hex (12)
- httpd (12)
- import (12)
- include (12)
- inspect (12)
- install (12)
-
install
_ files (12) -
instance
_ eval (24) -
instance
_ variables (12) - j (12)
- kill (12)
- libpathflag (12)
-
link
_ command (12) - method (12)
- mkdir (12)
-
module
_ eval (24) - namespace (12)
- oct (12)
- open (24)
- path (12)
-
pretty
_ print (24) - print (60)
- printf (60)
-
psych
_ y (12) -
public
_ instance _ method (12) - putc (36)
- puts (48)
- raise (12)
-
remove
_ const (12) - reopen (60)
- require (12)
- rmdir (12)
- sample (48)
- scanf (12)
- send (24)
-
set
_ trace _ func (12) - skip (1)
- status (12)
- tag (11)
- terminate (12)
- test (18)
- timeout (8)
-
to
_ a (12) -
to
_ ary (12) -
to
_ f (12) -
to
_ i (12) -
to
_ int (12) -
to
_ str (12) -
try
_ compile (24) -
try
_ constant (24) -
try
_ cpp (24) -
try
_ do (24) -
try
_ link (24) -
try
_ run (24) -
try
_ static _ assert (24) -
try
_ type (24) - value (11)
-
with
_ werror (24) - xmp (12)
- xpopen (24)
- xsystem (12)
- y (12)
検索結果
先頭5件
-
Exception
# exception -> self (9107.0) -
引数を指定しない場合は self を返します。引数を指定した場合 自身のコピー を生成し Exception#message 属性を error_message にして返します。
...数を指定した場合 自身のコピー
を生成し Exception#message 属性を error_message にして返します。
Kernel.#raise は、実質的に、例外オブジェクトの exception
メソッドの呼び出しです。
@param error_message エラーメッセージを表す文字列......を指定します。
//emlist[例][ruby]{
begin
# ... # 何か処理
rescue => e
raise e.exception("an error occurs during hogehoge process") # 詳しいエラーメッセージ
end
//}... -
Array
# sample -> object | nil (6143.0) -
配列の要素を1個(引数を指定した場合は自身の要素数を越えない範囲で n 個) ランダムに選んで返します。
...。
配列が空の場合、無引数の場合は nil を、個数を指定した場合は空配列を返します。
srand()が有効です。
@param n 取得する要素の数を指定します。自身の要素数(self.length)以上の
値を指定した場合は要素数と同じ数......。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@param random 乱数生成器(主に Random オブジェクト)を指定します。
選択する要素のインデックスを返す rand......デックスの最大値が指定されます。
Kernel.#rand、Random を使用しないオブジェク
トを指定した場合、Kernel.#srandの指定に影響されません。
@raise TypeError 引数 n に整数以外の(暗黙の型変換が行え... -
Array
# sample(n) -> Array (6143.0) -
配列の要素を1個(引数を指定した場合は自身の要素数を越えない範囲で n 個) ランダムに選んで返します。
...。
配列が空の場合、無引数の場合は nil を、個数を指定した場合は空配列を返します。
srand()が有効です。
@param n 取得する要素の数を指定します。自身の要素数(self.length)以上の
値を指定した場合は要素数と同じ数......。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@param random 乱数生成器(主に Random オブジェクト)を指定します。
選択する要素のインデックスを返す rand......デックスの最大値が指定されます。
Kernel.#rand、Random を使用しないオブジェク
トを指定した場合、Kernel.#srandの指定に影響されません。
@raise TypeError 引数 n に整数以外の(暗黙の型変換が行え... -
Array
# sample(n , random: Random) -> Array (6143.0) -
配列の要素を1個(引数を指定した場合は自身の要素数を越えない範囲で n 個) ランダムに選んで返します。
...。
配列が空の場合、無引数の場合は nil を、個数を指定した場合は空配列を返します。
srand()が有効です。
@param n 取得する要素の数を指定します。自身の要素数(self.length)以上の
値を指定した場合は要素数と同じ数......。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@param random 乱数生成器(主に Random オブジェクト)を指定します。
選択する要素のインデックスを返す rand......デックスの最大値が指定されます。
Kernel.#rand、Random を使用しないオブジェク
トを指定した場合、Kernel.#srandの指定に影響されません。
@raise TypeError 引数 n に整数以外の(暗黙の型変換が行え... -
Array
# sample(random: Random) -> object | nil (6143.0) -
配列の要素を1個(引数を指定した場合は自身の要素数を越えない範囲で n 個) ランダムに選んで返します。
...。
配列が空の場合、無引数の場合は nil を、個数を指定した場合は空配列を返します。
srand()が有効です。
@param n 取得する要素の数を指定します。自身の要素数(self.length)以上の
値を指定した場合は要素数と同じ数......。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@param random 乱数生成器(主に Random オブジェクト)を指定します。
選択する要素のインデックスを返す rand......デックスの最大値が指定されます。
Kernel.#rand、Random を使用しないオブジェク
トを指定した場合、Kernel.#srandの指定に影響されません。
@raise TypeError 引数 n に整数以外の(暗黙の型変換が行え... -
Module
# public _ instance _ method(name) -> UnboundMethod (6137.0) -
self の public インスタンスメソッド name をオブジェクト化した UnboundMethod を返します。
...elf の public インスタンスメソッド name をオブジェクト化した UnboundMethod を返します。
@param name メソッド名を Symbol または String で指定します。
@raise NameError 定義されていないメソッド名や、
protected メソッド名、 private......として与えると発生します。
//emlist[例][ruby]{
Kernel.public_instance_method(:object_id) #=> #<UnboundMethod: Kernel#object_id>
Kernel.public_instance_method(:p) # method `p' for module `Kernel' is private (NameError)
//}
@see Module#instance_method,Object#public_method... -
LoadError
# path -> String | nil (6133.0) -
Kernel.#require や Kernel.#load に失敗したパスを返します。
...
Kernel.#require や Kernel.#load に失敗したパスを返します。
begin
require 'this/file/does/not/exist'
rescue LoadError => e
e.path # => 'this/file/does/not/exist'
end
パスが定まらない場合は nil を返します。... -
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...