るりまサーチ

最速Rubyリファレンスマニュアル検索!
558件ヒット [1-100件を表示] (0.044秒)
トップページ > クエリ:-[x] > クエリ:on[x] > ライブラリ:ビルトイン[x] > 種類:特異メソッド[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

クラス

モジュール

オブジェクト

検索結果

<< 1 2 3 ... > >>

Thread.report_on_exception -> bool (12335.0)

真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。

...derr に以下のように出力します:

#<Thread:...> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
2: from -e:1:in `block in <main>'
1: from -e:1:in `times'

これによってスレッドのエラーを早期に捕捉でき...
...oin や Thread#value でそのスレッドの終了を待つことが保証できるなら、
スレッド開始時に Thread.current.report_on_exception = false でレポートを無効化しても
安全です。しかし、この場合、例外をハンドルするのが遅れたり、親...
...いて
終了を待つことができなかったりするかもしれません。

スレッドごとに設定する方法は Thread#report_on_exception= を参照してください。

@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを...

Thread.abort_on_exception -> bool (12323.0)

真の時は、いずれかのスレッドが例外によって終了した時に、インタプリタ 全体を中断させます。false の場合、あるスレッドで起こった例外は、Thread#join などで検出されない限りそのスレッドだけをなにも警告を出さずに終了させます。

...ad#exceptionを参照してください。

@param newstate スレッド実行中に例外発生した場合、インタプリタ全体を終了させるかどうかを true か false で指定します。

//emlist[例][ruby]{
Thread.abort_on_exception # => false
Thread.abort_on_exception = true
Th...
...read.abort_on_exception # => true
//}...

Thread.report_on_exception=(newstate) (12235.0)

真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。

...derr に以下のように出力します:

#<Thread:...> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
2: from -e:1:in `block in <main>'
1: from -e:1:in `times'

これによってスレッドのエラーを早期に捕捉でき...
...oin や Thread#value でそのスレッドの終了を待つことが保証できるなら、
スレッド開始時に Thread.current.report_on_exception = false でレポートを無効化しても
安全です。しかし、この場合、例外をハンドルするのが遅れたり、親...
...いて
終了を待つことができなかったりするかもしれません。

スレッドごとに設定する方法は Thread#report_on_exception= を参照してください。

@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを...

Encoding::Converter.search_convpath(source_encoding, destination_encoding, options) -> Array (9583.0)

引数で指定した文字エンコーディングの変換の経路を配列にして返します。

...nation_encoding 変換先の文字エンコーディングを
Encoding オブジェクトか文字列で指定し
ます。

@param options 変換の詳細を指定する定数やハッシュを指定します。
Encoding::Conver...
...:Converter.search_convpath("ISO-8859-1", "EUC-JP")
# => [[#<Encoding:ISO-8859-1>, #<Encoding:UTF-8>],
# [#<Encoding:UTF-8>, #<Encoding:EUC-JP>]]

p Encoding::Converter.search_convpath("ISO-8859-1", "EUC-JP", universal_newline: true)
# or
p Encoding::Converter.search_convpath("ISO-8859-1", "EUC-J...
...# => [[#<Encoding:ISO-8859-1>, #<Encoding:UTF-8>],
# [#<Encoding:UTF-8>, #<Encoding:EUC-JP>],
# "universal_newline"]

p Encoding::Converter.search_convpath("ISO-8859-1", "UTF-32BE", universal_newline: true)
# or
p Encoding::Converter.search_convpath("ISO-8859-1", "UTF-32BE", newline: :unive...

Exception.exception(error_message = nil) -> Exception (9303.0)

例外オブジェクトを生成して返します。

...属性 Exception#message の値になり、デフォルトの例外ハンドラで表示されます。

//emlist[例][ruby]{
e = Exception.new("some message")
p e # => #<Exception: some message>
p e.message # => "some message"
//}

//emlist[例][ruby]{
e = Exception.exception("some message...
...")
p e # => #<Exception: some message>
p e.message # => "some message"
//}...

絞り込み条件を変える

RubyVM::InstructionSequence.compile_option -> Hash (9203.0)

命令シーケンスのコンパイル時のデフォルトの最適化オプションを Hash で返 します。

...byVM::InstructionSequence.compile_option

# => {:inline_const_cache=>true,
# :peephole_optimization=>true,
# :tailcall_optimization=>false,
# :specialized_instruction=>true,
# :operands_unification=>true,
# :instructions_unification=>false,
# :stack_caching=>false,
# :trace_instruction=>true,
# :fro...
...zen_string_literal=>false,
# :debug_frozen_string_literal=>false,
# :coverage_enabled=>true,
# :debug_level=>0}
//}

@see RubyVM::InstructionSequence.compile_option=...

Thread::ConditionVariable.new -> Thread::ConditionVariable (6303.0)

状態変数を生成して返します。

状態変数を生成して返します。

Regexp.union(*pattern) -> Regexp (6233.0)

引数として与えた pattern を選択 | で連結し、Regexp として返します。 結果の Regexp は与えた pattern のどれかにマッチする場合にマッチするものになります。

...union(/a/, /b/, /c/) # => /(?-mix:a)|(?-mix:b)|(?-mix:c)/
//}

引数を一つだけ与える場合は、Array を与えても Regexp を生成します。
つまり、以下のように書くことができます。

//emlist[][ruby]{
arr = [/a/, /b/, /c/]
p Regexp.union(arr) # => /(?-mix:a)|(?-mi...
...x:b)|(?-mix:c)/
# 1.8.7 より前は、以下のように書く必要があった
p Regexp.union(*arr) # => /(?-mix:a)|(?-mix:b)|(?-mix:c)/
//}

pattern は Regexp または String で与えます。
String で与えた場合、それ自身と等しい文字列にマッチするものと解釈され...
...ます。

//emlist[][ruby]{
p Regexp.union("a", "?", "b") # => /a|\?|b/
p Regexp.union(/a/, "*") # => /(?-mix:a)|\*/
//}

引数をひとつも与えなかった場合、決してマッチしない Regexp を返します。

//emlist[][ruby]{
p Regexp.union() # => /(?!)/
//}

結果の Regexp が...

Array.try_convert(obj) -> Array | nil (6203.0)

to_ary メソッドを用いて obj を配列に変換しようとします。

...引数が配列であるかどうかを調べるために使えます。

//emlist[例][ruby]{
Array.try_convert([1]) # => [1]
Array.try_convert("1") # => nil

if tmp = Array.try_convert(arg)
# the argument is an array
elsif tmp = String.try_convert(arg)
# the argument is a string
end
//}...

ENV.clone(freeze: true) -> object (6203.0)

ENV オブジェクトの複製を作成して返します。

...3.1 からは複製で環境変数を操作するときに deprecated 警告がでます。

テスト実行中に環境変数を退避する用途には ENV.to_h を使用してください。

//emlist[][ruby]{
saved_env = ENV.to_h
# (テストなど)
ENV.replace(saved_env)
//}

@see Object#clone...
...複製で環境変数を操作するときに deprecated 警告がでます。

テスト実行中に環境変数を退避する用途には ENV.to_h を使用してください。

//emlist[][ruby]{
saved_env = ENV.to_h
# (テストなど)
ENV.replace(saved_env)
//}

@see Object#clone
@see ENV.dup...

絞り込み条件を変える

<< 1 2 3 ... > >>