るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.048秒)
トップページ > クエリ:method[x] > クエリ:main[x] > 種類:クラス[x]

別のキーワード

  1. irb/input-method gets
  2. irb/input-method new
  3. _builtin define_method
  4. irb/input-method encoding
  5. irb/input-method readable_atfer_eof?

ライブラリ

キーワード

検索結果

Timeout::Error (19.0)

timeout で定義される例外クラスです。 関数 timeout がタイムアウトすると発生します。

...<==
require 'timeout.rb'
class
Foo
FooTimeoutError = Class.new(Timeout::Error)
def longlongtime_method
Timeout.timeout(100, FooTimeoutError) {
...
}
end
end

==> main.rb <==
require 'foo'...
...Timeout.timeout(5) {
Foo.new.longlongtime_method
}...

NameError (13.0)

未定義のローカル変数や定数を使用したときに発生します。

...未定義のローカル変数や定数を使用したときに発生します。

例:

bar
# => NameError: undefined local variable or method `bar' for main:Object...