るりまサーチ (Ruby 2.3.0)

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

別のキーワード

  1. _builtin errno
  2. exxx errno
  3. systemcallerror errno
  4. send errno::exxx
  5. new errno::exxx

ライブラリ

キーワード

検索結果

SystemCallError#errno -> Integer | nil (22.0)

レシーバに対応するシステム依存のエラーコードを返します。

...Errno::ENOENT => err
p err.errno # => 2
p Errno::ENOENT::Errno # => 2
end

begin
raise SystemCallError, 'message'
rescue SystemCallError => err
p err.errno # => nil
end


なお、例外を発生させずにエラーコードを得るに...

SystemCallError.===(other) -> bool (22.0)

other が SystemCallError のサブクラスのインスタンスで、 かつ、other.errno の値が self::Errno と同じ場合に真を返します。そうでない場合は偽を返します。

...other が SystemCallError のサブクラスのインスタンスで、
かつ、other.errno の値が self::Errno と同じ場合に真を返します。そうでない場合は偽を返します。

従って、特に other が self.kind_of?(other) である場合には Module#=== と同様に真...