File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ library : _builtin
3+ include :
4+ - IO::WaitReadable
5+ ---
6+ # class IO::EAGAINWaitReadable < Errno::EAGAIN
7+
8+ [ m: IO #read_nonblock] などのノンブロッキング I/O が読み込み待ちの状態で
9+ ` EAGAIN ` を検出したときに発生する例外です。
10+
11+ [ c:Errno::EAGAIN] のサブクラスであり [ c:IO::WaitReadable] を include して
12+ いるため、` rescue IO::WaitReadable ` と ` rescue Errno::EAGAIN ` のどちらでも
13+ 捕捉できます。同様の例外を発生させるたびに [ m: Object #extend] するのでは
14+ なく、あらかじめ [ c:IO::WaitReadable] を include したこの専用クラスの
15+ インスタンスを生成することで実現されています。
16+
17+ - ** SEE** [ c:IO::WaitReadable] , [ m: IO #read_nonblock]
Original file line number Diff line number Diff line change 1+ ---
2+ library : _builtin
3+ include :
4+ - IO::WaitWritable
5+ ---
6+ # class IO::EAGAINWaitWritable < Errno::EAGAIN
7+
8+ [ m: IO #write_nonblock] などのノンブロッキング I/O が書き込み待ちの状態で
9+ ` EAGAIN ` を検出したときに発生する例外です。
10+
11+ [ c:Errno::EAGAIN] のサブクラスであり [ c:IO::WaitWritable] を include して
12+ いるため、` rescue IO::WaitWritable ` と ` rescue Errno::EAGAIN ` のどちらでも
13+ 捕捉できます。同様の例外を発生させるたびに [ m: Object #extend] するのでは
14+ なく、あらかじめ [ c:IO::WaitWritable] を include したこの専用クラスの
15+ インスタンスを生成することで実現されています。
16+
17+ - ** SEE** [ c:IO::WaitWritable] , [ m: IO #write_nonblock]
Original file line number Diff line number Diff line change 1+ ---
2+ library : _builtin
3+ include :
4+ - IO::WaitReadable
5+ ---
6+ # class IO::EINPROGRESSWaitReadable < Errno::EINPROGRESS
7+
8+ ノンブロッキングな I/O 処理が読み込み待ちの状態で ` EINPROGRESS ` を検出
9+ したときに発生する例外です。
10+
11+ [ c:Errno::EINPROGRESS] のサブクラスであり [ c:IO::WaitReadable] を include
12+ しているため、` rescue IO::WaitReadable ` と ` rescue Errno::EINPROGRESS ` の
13+ どちらでも捕捉できます。同様の例外を発生させるたびに [ m: Object #extend]
14+ するのではなく、あらかじめ [ c:IO::WaitReadable] を include したこの専用
15+ クラスのインスタンスを生成することで実現されています。
16+
17+ - ** SEE** [ c:IO::WaitReadable] , [ c:IO::EINPROGRESSWaitWritable]
Original file line number Diff line number Diff line change 1+ ---
2+ library : _builtin
3+ include :
4+ - IO::WaitWritable
5+ ---
6+ # class IO::EINPROGRESSWaitWritable < Errno::EINPROGRESS
7+
8+ [ m: Socket #connect_nonblock] などのノンブロッキングな接続処理が完了を
9+ 待っている状態で ` EINPROGRESS ` を検出したときに発生する例外です。
10+
11+ [ c:Errno::EINPROGRESS] のサブクラスであり [ c:IO::WaitWritable] を include
12+ しているため、` rescue IO::WaitWritable ` と ` rescue Errno::EINPROGRESS ` の
13+ どちらでも捕捉できます。同様の例外を発生させるたびに [ m: Object #extend]
14+ するのではなく、あらかじめ [ c:IO::WaitWritable] を include したこの専用
15+ クラスのインスタンスを生成することで実現されています。
16+
17+ - ** SEE** [ c:IO::WaitWritable] , [ m: Socket #connect_nonblock]
Original file line number Diff line number Diff line change 1+ ---
2+ library : _builtin
3+ ---
4+ # class Process::Waiter < Thread
5+
6+ [ m: Process ?.detach] が返す、子プロセスの終了を監視するスレッドを表す
7+ クラスです。
8+
9+ [ c: Thread ] のサブクラスであり、監視している子プロセスのプロセス ID を
10+ 保持しています。
11+
12+ - ** SEE** [ m: Process ?.detach]
13+
14+ ## Instance Methods
15+
16+ ### def pid -> Integer
17+
18+ 監視している子プロセスのプロセス ID を返します。
Original file line number Diff line number Diff line change 11---
22library : _builtin
3+ include :
4+ - Random::Formatter
35---
46# class Random < Object
57
Original file line number Diff line number Diff line change 1+ ---
2+ library : _builtin
3+ ---
4+ # module Random::Formatter
5+
6+ 生成した乱数を 16 進文字列や base64 文字列、UUID など、人が扱いやすい
7+ 形式の文字列に整形するためのメソッド群を提供するモジュールです。
8+
9+ このモジュールは [ c: Random ] に include され、[ c: SecureRandom ] には
10+ extend されています。ただし、以下の整形用メソッドが定義されるのは
11+ ` require "random/formatter" ` を読み込んだとき(` require "securerandom" `
12+ でも読み込まれます)です。読み込むと、[ c: Random ] のインスタンスと
13+ [ c: SecureRandom ] の両方でこれらのメソッドが使えるようになります。
14+
15+ - random_bytes
16+ - hex
17+ - base64
18+ - urlsafe_base64
19+ - alphanumeric
20+ - uuid など
21+
22+ これらのメソッドの詳しい説明は [ c: SecureRandom ] を参照してください。
Original file line number Diff line number Diff line change 11---
22type : library
3+ extend :
4+ - Random::Formatter
35---
46安全な乱数発生器のためのインターフェースを提供するライブラリです。
57HTTP のセッションキーなどに適しています。
You can’t perform that action at this time.
0 commit comments