ライブラリ
- ビルトイン (847)
-
bigdecimal
/ util (12) - date (12)
- dbm (12)
- e2mmap (24)
- gdbm (12)
- getoptlong (36)
-
irb
/ ext / math-mode (4) - logger (1)
- matrix (120)
-
minitest
/ spec (2) -
minitest
/ unit (19) - monitor (60)
-
net
/ ftp (36) -
net
/ http (48) -
net
/ imap (120) -
net
/ pop (12) - open-uri (24)
- openssl (312)
- optparse (408)
- prime (24)
- pstore (12)
- rake (12)
- resolv-replace (12)
- rubygems (12)
-
rubygems
/ command (12) -
rubygems
/ indexer (12) -
rubygems
/ installer (12) -
rubygems
/ specification (12) -
rubygems
/ user _ interaction (12) - sdbm (12)
- set (18)
- singleton (24)
- socket (120)
- stringio (24)
- thwait (6)
-
webrick
/ httpauth / basicauth (24) -
webrick
/ httpauth / digestauth (24) -
webrick
/ httpservlet / abstract (12) -
webrick
/ httpservlet / filehandler (72) - win32ole (84)
クラス
- Array (114)
- BasicSocket (36)
- Complex (36)
- DBM (12)
- Date (12)
-
Encoding
:: Converter (24) -
Enumerator
:: Lazy (24) - Exception (104)
- Fiber (6)
- File (12)
- GDBM (12)
-
Gem
:: Command (12) -
Gem
:: Indexer (12) -
Gem
:: Installer (12) -
Gem
:: Specification (12) -
Gem
:: StreamUI (12) - GetoptLong (36)
- IO (204)
-
IRB
:: Context (4) - Integer (12)
-
Logger
:: Application (1) - Matrix (120)
- Module (72)
- Monitor (24)
-
MonitorMixin
:: ConditionVariable (24) - Mutex (2)
-
Net
:: FTP (36) -
Net
:: HTTP (24) -
Net
:: HTTPResponse (12) -
Net
:: IMAP (120) -
Net
:: POP3 (12) - Object (62)
-
OpenSSL
:: Config (12) -
OpenSSL
:: OCSP :: BasicResponse (12) -
OpenSSL
:: PKey :: EC :: Group (12) -
OpenSSL
:: PKey :: EC :: Point (12) -
OpenSSL
:: SSL :: SSLContext (24) -
OpenSSL
:: SSL :: SSLSocket (48) -
OpenSSL
:: SSL :: Session (36) -
OpenSSL
:: X509 :: CRL (36) -
OpenSSL
:: X509 :: Certificate (36) -
OpenSSL
:: X509 :: Extension (36) -
OpenSSL
:: X509 :: Revoked (24) - OptionParser (348)
- PStore (12)
- Prime (12)
-
Rake
:: InvocationChain (12) - Rational (97)
- SDBM (12)
- Set (24)
- Socket (36)
-
Socket
:: Option (36) - String (3)
- StringIO (24)
- TCPServer (12)
- Thread (18)
-
Thread
:: Mutex (10) - ThreadsWait (6)
- TracePoint (19)
- UDPSocket (12)
-
WEBrick
:: HTTPAuth :: BasicAuth (24) -
WEBrick
:: HTTPAuth :: DigestAuth (24) -
WEBrick
:: HTTPServlet :: AbstractServlet (12) -
WEBrick
:: HTTPServlet :: DefaultFileHandler (24) -
WEBrick
:: HTTPServlet :: FileHandler (48) -
WIN32OLE
_ EVENT (24) -
WIN32OLE
_ TYPE (24) -
WIN32OLE
_ TYPELIB (36)
モジュール
- Enumerable (48)
- Exception2MessageMapper (24)
- Kernel (12)
-
MiniTest
:: Assertions (19) - MonitorMixin (12)
-
Net
:: HTTPHeader (12) -
OpenSSL
:: Buffering (24) -
OpenURI
:: OpenRead (24) -
OptionParser
:: Arguable (60) - Singleton (24)
キーワード
- ** (1)
- - (12)
-
/ (12) - == (12)
- Fail (6)
- Raise (6)
- accept (12)
-
accept
_ nonblock (24) -
add
_ extension (36) -
add
_ value (12) - append (24)
- assert (1)
-
assert
_ block (1) -
assert
_ empty (1) -
assert
_ equal (1) -
assert
_ in _ delta (1) -
assert
_ in _ epsilon (1) -
assert
_ includes (1) -
assert
_ instance _ of (1) -
assert
_ kind _ of (1) -
assert
_ match (1) -
assert
_ nil (1) -
assert
_ operator (1) -
assert
_ raises (1) -
assert
_ respond _ to (1) -
assert
_ same (1) -
assert
_ send (1) -
assert
_ throws (1) -
auth
_ only (12) - authenticate (24)
- backtrace (12)
-
backtrace
_ locations (12) - bool (12)
- byteindex (3)
- cause (12)
- ceil (12)
- challenge (24)
- ciphers= (12)
- clone (36)
- cofactor (12)
-
cofactor
_ expansion (12) -
collect
_ concat (12) - combination (24)
- connect (48)
-
connect
_ address (12) -
connect
_ nonblock (24) -
const
_ get (12) -
const
_ missing (12) -
content
_ length (12) - convert (12)
- create (12)
- delete (12)
-
deprecate
_ constant (12) - detect (24)
- diagonal? (12)
-
do
_ GET (24) -
do
_ OPTIONS (12) -
do
_ POST (12) - dup (36)
- each (72)
-
each
_ line (72) - eigen (12)
- eigensystem (12)
- environment (12)
- examine (12)
- exception (24)
- exit (12)
- extensions= (36)
- fail (6)
- fetch (48)
- find (24)
- finish (12)
-
flat
_ map (12) - flock (12)
- floor (12)
- flunk (1)
- gem (12)
-
get
_ one _ gem _ name (12) - getopts (36)
- inspect (12)
- install (12)
-
instruction
_ sequence (7) - int (12)
- intersection (18)
-
laplace
_ expansion (12) - linger (12)
- login (24)
-
major
_ version (24) -
make
_ partial _ content (12) -
math
_ mode= (4) -
minor
_ version (24) -
mon
_ check _ owner (6) -
mon
_ exit (18) -
must
_ be _ within _ epsilon (1) -
must
_ respond _ to (1) -
next
_ wait (6) - oid= (12)
-
on
_ curve? (12) -
on
_ event (12) -
on
_ event _ with _ outargs (12) - open (24)
- order (48)
- order! (48)
- ordering= (12)
- orthogonal? (12)
- paranoid (12)
- parse (24)
- parse! (24)
- permutation (24)
- permutation? (12)
- permute (24)
- permute! (24)
-
point
_ conversion _ form (12) -
post
_ connection _ check (12) -
prime
_ division (24) -
private
_ constant (12) -
public
_ constant (12) - quo (12)
-
raised
_ exception (12) - rationalize (24)
-
read
_ nonblock (36) -
recv
_ nonblock (12) -
recvfrom
_ nonblock (12) - reject (12)
-
remove
_ const (12) - rename (24)
-
renegotiation
_ cb= (12) -
repeated
_ combination (24) -
repeated
_ permutation (24) -
report
_ on _ exception (9) -
report
_ on _ exception= (9) - request (24)
-
respond
_ to? (12) - round (12)
- seek (12)
- select (12)
- service (24)
-
set
_ backtrace (12) - setquota (12)
- setsockopt (12)
-
singleton
_ class (12) -
singleton
_ method (12) - skip (1)
- start (1)
- status (12)
- subscribe (12)
- synchronize (12)
- terminate (12)
-
terminate
_ interaction (12) -
to
_ d (12) -
to
_ der (24) -
to
_ i (12) -
to
_ pem (12) -
to
_ r (12) -
to
_ text (12) - tr (12)
- trace (12)
- transaction (12)
- truncate (12)
- union (12)
- unsubscribe (12)
- validate (12)
- value (12)
- value= (12)
- version (12)
- version= (24)
- wait (12)
-
wait
_ while (12) -
write
_ nonblock (36)
検索結果
先頭5件
-
OpenSSL
:: PKey :: EC :: Group # point _ conversion _ form -> Symbol (12207.0) -
点のエンコーディング方式を返します。
...:compressed
* :uncompressed
* :hybrid
詳しくは X9.62 (ECDSA) などを参照してください。
@raise OpenSSL::PKey::EC::Group::Error 得られたエンコーディングが未知の値であった
場合に発生します。
@see OpenSSL::PKey::EC::Group#point_conversion_form=... -
OpenSSL
:: SSL :: SSLSocket # post _ connection _ check(hostname) -> true (12207.0) -
接続後検証を行います。
...true を返し、失敗した場合は例外
OpenSSL::SSL::SSLError を発生させます。
OpenSSL の API では、
OpenSSL::SSL::SSLSocket#connect や OpenSSL::SSL::SSLSocket#accept
での検証は実用的には不完全です。
CA が証明書に署名してそれが失効していない......証明書に記載されている FQDN が
一致しているかどうかを調べます。このメソッドはその FQDN のチェックを行ないます。
@param hostname チェックする FQDN の文字列
@raise OpenSSL::SSL::SSLError チェックに失敗した場合に発生します... -
Socket
# connect _ nonblock(server _ sockaddr) -> 0 (12207.0) -
ソケットをノンブロッキングモードに設定した後、 connect(2) を呼び出します。
...定した後、
connect(2) を呼び出します。
引数、返り値は Socket#connect と同じです。
connect が EINPROGRESS エラーを報告した場合、その例外(Errno::EINPROGRESS)
には IO::WaitWritable が Object#extend されます。
これを connect_nonblock をリトライ......Constants
socket = Socket.new(AF_INET, SOCK_STREAM, 0)
sockaddr = Socket.sockaddr_in(80, 'www.google.com')
begin # emulate blocking connect
socket.connect_nonblock(sockaddr)
rescue IO::WaitWritable
IO.select(nil, [socket]) # wait 3-way handshake completion
begin
socket.conn......ect_nonblock(sockaddr) # check connection failure
rescue Errno::EISCONN
end
end
socket.write("GET / HTTP/1.0\r\n\r\n")
results = socket.read
@param server_sockaddr 接続先アドレス
@raise Errno::EXXX connect(2) がエラーを報告した場合に発生します。詳しくは... -
Exception
# exception(error _ message) -> Exception (9213.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
//}... -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (9207.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
...。Exception#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。
現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。
//emlist[例: test.rb][ruby]{
require "date"
def check_long_month(month)
return......if Date.new(2000, month, -1).day == 31
raise "#{month} is not long month"
end
def get_exception
return begin
yield
rescue => e
e
end
end
e = get_exception { check_long_month(2) }
p e.backtrace_locations
# => ["test.rb:4:in `check_long_month'", "test.rb:15:in `block in <main>'", "t......est.rb:9:in `get_exception'", "test.rb:15:in `<main>'"]
//}
@see Exception#backtrace... -
MiniTest
:: Assertions # assert _ in _ epsilon(actual , expected , epsilon = 0 . 001 , message = nil) -> true (9207.0) -
与えられた期待値と実際の値の相対誤差が許容範囲内である場合、検査にパスしたことになります。
...である場合、検査をパスします。
[expected, actual].min * epsilon >= (extected - actual).abs
@param expected 期待値を指定します。
@param actual 実際の値を指定します。
@param epsilon 許容する相対誤差を指定します。
@param message 検査に失敗......した場合に表示するメッセージを指定します。
文字列か Proc を指定します。Proc である場合は Proc#call した
結果を使用します。
@raise MiniTest::Assertion 検査に失敗した場合に発生します。... -
Singleton
# clone (9117.0) -
@raise TypeError このメソッドを呼び出した場合に発生します。
...@raise TypeError このメソッドを呼び出した場合に発生します。... -
Encoding
:: Converter # convert(source _ string) -> String (9113.0) -
与えられた文字列を変換して、変換できた結果を返します。 引数の末尾の文字がバイト列の途中で終わっている場合、そのバイト列は変換器内に取り置かれます。 変換を終了させるには Encoding::Converter#finish を呼びます。
...::Converter#finish を呼びます。
Encoding::Converter を用いると、文字列の一部または全部を渡して変換を行うことができます。よって、不正なバイトを意識せずにストリームから読み出した文字列を変換したいときには Encoding::Conve......onverter#convert では、これらの例外を捕獲しても、例外を起こしたところから変換を再開することはできません。不正なバイトや変換先で未定義な文字をエスケープしたい場合やさらに細かい指定を行いたい場合は、Encoding::Con......verter#primitive_convert を用います。
@param source_string 変換する文字列の一部または全部です。
@return 変換結果である文字列の一部または全部です。
@raise Encoding::InvalidByteSequenceError 変換元のエンコーディングにおいて不正なバイ... -
Exception
# exception -> self (9113.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
//}... -
OptionParser
# environment(env) -> [String] (9113.0) -
環境変数 env に対して Shellwords.#shellwords を呼 んで配列にしてから parse を行ないます。
...。
@raise OptionParser::ParseError パースに失敗した場合、発生します。
実際は OptionParser::ParseError のサブク
ラスになります。
//emlist[例][ruby]{
require "optparse"
config = {}
opts = OptionParser.......new
opts.on("-r", "--require LIBRARY"){|lib| config[:lib] = lib }
# HOGE_OPT は hoge というプログラム名に対応した名前です
ENV['HOGE_OPT'] = %q{--require lib1 'remain data'}
p opts.environment('HOGE_OPT') # => ["remain data"]
p config # => {:lib=>"lib1"}...