るりまサーチ

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

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

Fiber#raise -> object (18228.0)

selfが表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。

...[例][ruby]{
f = Fiber.new { Fiber.yield }
f.resume
f.raise "Error!" # => Error! (RuntimeError)
//}

//emlist[ファイバー内のイテレーションを終了させる例][ruby]{
f = Fiber.new do
loop do
Fiber.yield(:loop)
end
:exit
end

p f.resume # => :loop
p f.raise Stop...
...Iteration # => :exit
//}...

Fiber#raise(exception, message = nil, backtrace = nil) -> object (18228.0)

selfが表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。

...[例][ruby]{
f = Fiber.new { Fiber.yield }
f.resume
f.raise "Error!" # => Error! (RuntimeError)
//}

//emlist[ファイバー内のイテレーションを終了させる例][ruby]{
f = Fiber.new do
loop do
Fiber.yield(:loop)
end
:exit
end

p f.resume # => :loop
p f.raise Stop...
...Iteration # => :exit
//}...

Fiber#raise(message) -> object (18228.0)

selfが表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。

...[例][ruby]{
f = Fiber.new { Fiber.yield }
f.resume
f.raise "Error!" # => Error! (RuntimeError)
//}

//emlist[ファイバー内のイテレーションを終了させる例][ruby]{
f = Fiber.new do
loop do
Fiber.yield(:loop)
end
:exit
end

p f.resume # => :loop
p f.raise Stop...
...Iteration # => :exit
//}...

Module#>(other) -> bool | nil (18149.0)

比較演算子。 self が other の先祖である場合、true を返します。 self が other の子孫か同一クラスである場合、false を返します。

...@raise TypeError other がクラスやモジュールではない場合に発生します。

@see Module#<

//emlist[例][ruby]{
module Awesome; end
module Included
include Awesome
end
module Prepended
prepend Awesome
end

Included.ancestors # => [Included, Awesome]
Awesome > Included # => tr...
...ue
Included > Awesome # => false

Prepended.ancestors # => [Awesome, Prepended]
Awesome > Prepended # => true
Prepended > Awesome # => false

Awesome > Awesome # => false
Awesome > Object # => nil
//}...

Comparable#>(other) -> bool (18125.0)

比較演算子 <=> をもとにオブジェクト同士を比較します。 <=> が正の整数を返した場合に、true を返します。 それ以外の整数を返した場合に、false を返します。

...=> をもとにオブジェクト同士を比較します。
<=> が正の整数を返した場合に、true を返します。
それ以外の整数を返した場合に、false を返します。

@param other 自身と比較したいオブジェクトを指定します。
@raise ArgumentError <=>...
...が nil を返したときに発生します。

//emlist[例][ruby]{
1 > 0 # => true
1 > 1 # => false
//}...

絞り込み条件を変える

TracePoint#raised_exception -> Exception (6231.0)

発生した例外を返します。

...します。

@raise RuntimeError :raise イベントのためのイベントフックの外側で実行し
た場合に発生します。

//emlist[例][ruby]{
trace = TracePoint.new(:raise) do |tp|
tp.raised_exception # => #<ZeroDivisionError: divided by 0>
end
trace.enable
b...

OpenSSL::BN#>>(other) -> OpenSSL::BN (6125.0)

自身を other ビット右シフトした値を返します。

...自身を other ビット右シフトした値を返します。

//emlist[][ruby]{
require 'openssl'

bn = 2.to_bn
bn >> 1 # => #<OpenSSL::BN 1>
bn # => #<OpenSSL::BN 2>
//}

@param other シフトするビット数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#rshift!...

Comparable#>=(other) -> bool (6113.0)

比較演算子 <=> をもとにオブジェクト同士を比較します。 <=> が正の整数か 0 を返した場合に、true を返します。 それ以外の整数を返した場合に、false を返します。

...子 <=> をもとにオブジェクト同士を比較します。
<=> が正の整数か 0 を返した場合に、true を返します。
それ以外の整数を返した場合に、false を返します。

@param other 自身と比較したいオブジェクトを指定します。
@raise Argume...
...ntError <=> が nil を返したときに発生します。

//emlist[例][ruby]{
1 >= 0 # => true
1 >= 1 # => true
1 >= 2 # => false
//}...

Module#>=(other) -> bool | nil (6113.0)

比較演算子。self が other の先祖か同一クラスである場合、 true を返します。 self が other の子孫である場合、false を返します。

...@raise TypeError other がクラスやモジュールではない場合に発生します。

@see Module#<

//emlist[例][ruby]{
module Foo; end
module Bar
include Foo
end
module Baz
prepend Foo
end

Bar.ancestors # => [Bar, Foo]
Foo >= Bar # => true
Bar >= Foo # => false

Baz.ancestors # => [...
...Foo, Baz]
Foo >= Baz # => true
Baz >= Foo # => false

Foo >= Foo # => true
Foo >= Object # => nil
//}...

OpenSSL::BN#<=>(other) -> -1 | 0 | 1 (6113.0)

自身と other を比較し、自身が小さいときには -1、 等しいときには 0、大きいときには 1 を返します。

...す。

//emlist[][ruby]{
require 'openssl'

OpenSSL::BN.new(5) <=> 5 # => 0

OpenSSL::BN.new(5) <=> OpenSSL::BN.new(9) # => -1
OpenSSL::BN.new(5) <=> OpenSSL::BN.new(5) # => 0
OpenSSL::BN.new(5) <=> OpenSSL::BN.new(-5) # => 1
//}

@param other 比較する整数
@raise TypeError 比較でき...

絞り込み条件を変える

<< 1 2 3 ... > >>