ライブラリ
- ビルトイン (36)
- json (24)
- monitor (6)
- openssl (84)
- pty (12)
-
rexml
/ document (12) -
rubygems
/ package / tar _ writer (12) - socket (12)
- uri (72)
- win32ole (12)
クラス
- Exception (24)
-
Gem
:: Package :: TarWriter (12) - Monitor (6)
- Object (12)
-
OpenSSL
:: BN (36) -
OpenSSL
:: PKey :: EC (12) -
OpenSSL
:: SSL :: SSLSocket (12) -
REXML
:: Text (12) - Socket (12)
-
URI
:: FTP (24) -
URI
:: Generic (12) -
URI
:: HTTP (12) -
URI
:: LDAP (12) -
URI
:: MailTo (12) - WIN32OLE (12)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - == (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 3
. 0 . 0 (5) - OCSP (12)
- SSLSocket (12)
-
backtrace
_ locations (12) -
check
_ closed (12) -
check
_ key (12) -
connect
_ nonblock (12) - generate (12)
-
initialize
_ copy (12) -
mon
_ check _ owner (6) - new (72)
- new2 (12)
-
ole
_ query _ interface (12) -
post
_ connection _ check (12) - prime? (24)
-
prime
_ fasttest? (12) -
ruby 1
. 8 . 4 feature (12) - unparse (12)
検索結果
先頭5件
-
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (24.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
..."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_mon... -
Exception
# ==(other) -> bool (18.0) -
自身と指定された other のクラスが同じであり、 message と backtrace が == メソッドで比較して 等しい場合に true を返します。そうでない場合に false を返します。
...例][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
results = [2, 2, 4].map { |e | get_exception { check_long_month(e) } }
p results.... -
JSON
. # generate(object , state = nil) -> String (18.0) -
与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。
..._nl
a string that is put at the end of a JSON object (default: '')
: :array_nl
a string that is put at the end of a JSON array (default: '')
: :check_circular
真を指定した場合、生成するオブジェクトの循環をチェックします。
この動作がデフォルトです。......と深さのチェックを行いません。デフォルトは 19 です。
@raise JSON::GeneratorError JSON::NaN, JSON::Infinity,JSON::MinusInfinity
を生成しようとした場合に発生します。
@raise JSON::CircularDatastructure 与えられたオブジェクトが循環参照... -
JSON
. # unparse(object , state = nil) -> String (18.0) -
与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。
..._nl
a string that is put at the end of a JSON object (default: '')
: :array_nl
a string that is put at the end of a JSON array (default: '')
: :check_circular
真を指定した場合、生成するオブジェクトの循環をチェックします。
この動作がデフォルトです。......と深さのチェックを行いません。デフォルトは 19 です。
@raise JSON::GeneratorError JSON::NaN, JSON::Infinity,JSON::MinusInfinity
を生成しようとした場合に発生します。
@raise JSON::CircularDatastructure 与えられたオブジェクトが循環参照... -
NEWS for Ruby 3
. 0 . 0 (18.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...`false`. 17371
//emlist{
0 => a
p a #=> 0
{b: 0, c: 1} => {b:}
p b #=> 0
//}
//emlist{
# version 3.0
0 in 1 #=> false
# version 2.7
0 in 1 #=> raise NoMatchingPatternError
//}
* Find-pattern is added. [EXPERIMENTAL]
16828
//emlist{
case ["a", 1, "b", "c", 2, "d", "e", "f", 3]
in [*pre,......ad of a LocalJumpError. 15575
* When a class variable is overtaken by the same definition in an
ancestor class/module, a RuntimeError is now raised (previously,
it only issued a warning in verbose mode). Additionally, accessing a
class variable from the toplevel scope is now a Runtim......he first argument is a URI. 16686
* Net::SMTP
* Add SNI support.
* Net::SMTP.start arguments are keyword arguments.
* TLS should not check the host name by default.
* OpenStruct
* Initialization is no longer lazy. 12136
* Builtin methods can now be overridden safely. 15409... -
OpenSSL
:: BN # prime? -> bool (18.0) -
自身が素数であるなら true を返します。
...ler-Rabin 法により確率的に判定します。
checkで指定した回数だけ繰り返します。
引数を省略した場合は OpenSSL が適切な
回数を判断します。
@param check Miller-Robin 法の繰り返しの回数
@raise OpenSSL::BNError 判定時にエラーが発生
@se... -
OpenSSL
:: OCSP (18.0) -
OCSP(Online Certificate Status Protocol)を取り扱うための モジュールです。OCSP は 2560 で定義されています。
...lication/ocsp-request')
raise "HTTP error" if !httpres.kind_of?(Net::HTTPOK)
res = OpenSSL::OCSP::Response.new(httpres.body)
puts "Response status: #{res.status_string}"
exit if res.status != OpenSSL::OCSP::RESPONSE_STATUS_SUCCESSFUL
basic_resp = res.basic
raise "nonce error" unless... -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12.0) -
1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))
...は Proc, Method オブジェクト限定でした。
これに伴い Proc#to_proc が追加されました。
: 終了ステータス [compat]
raise SystemExit したときに終了ステータス 1 で終了するようになりました。
((<ruby-dev:16776>))
: ((<"rescue/ensure on begi......[lib] [new]
追加
: ((<"io/wait">)) [lib] [new]
追加
: ((<mkmf>)) [lib] [new]
新しい判定メソッド have_type(), check_sizeof() が追加されました。
: ((<pathname>)) [lib] [new]
追加
: ((<resolv>)) [lib] [compat]
Win32 に対応しま... -
OpenSSL
:: SSL :: SSLSocket (12.0) -
ソケットをラップして SSL での認証と暗号通信を実現するためのクラスです。
....example.com', 443)
ssl = SSL::SSLSocket.new(soc, ctx)
ssl.hostname = 'www.example.com' # SNI
ssl.connect
ssl.post_connection_check('www.example.com')
raise "verification error" if ssl.verify_result != OpenSSL::X509::V_OK
print ssl.peer_cert.to_text
# HTTP リクエストを送信... -
Socket
# connect _ nonblock(server _ sockaddr) -> 0 (12.0) -
ソケットをノンブロッキングモードに設定した後、 connect(2) を呼び出します。
...letion
begin
socket.connect_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) がエラーを報告した場合...