るりまサーチ

最速Rubyリファレンスマニュアル検索!
323件ヒット [201-300件を表示] (0.049秒)

別のキーワード

  1. _builtin raise
  2. kernel raise
  3. fiber raise
  4. thread raise
  5. e2mmap raise

検索結果

<< < 1 2 3 4 > >>

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) がエラーを報告した場合...

絞り込み条件を変える

<< < 1 2 3 4 > >>