るりまサーチ

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

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

ライブラリ

モジュール

キーワード

検索結果

ObjectSpace.#undefine_finalizer(obj) -> object (8037.0)

obj に対するファイナライザをすべて解除します。 obj を返します。

...][ruby]{
class Sample
def Sample.callback
proc {
puts "finalize"
}
end

def initialize
ObjectSpace.define_finalizer(self, Sample.callback)
end

def undef
ObjectSpace.undefine_finalizer(self)
end
end

Sample
.new
GC.start
# => finalize

Sample
.new
sample
.undef
GC.star...

Kernel.#abort -> () (8007.0)

Ruby プログラムをエラーメッセージ付きで終了します。終了ステータスは 1 固定です。

...#(標準出力)
#=> start
# start1...
# end1 with #<SystemExit: error1>
# start2...
# end2...
#終了ステータス:1
#(標準エラー出力)
#=> error1
# Traceback (most recent call last):
# sample.rb:11:in `<main>': RuntimeError (RuntimeError)
//}

@see Kernel.#exit,Kernel.#exit!...

Kernel.#abort(message) -> () (8007.0)

Ruby プログラムをエラーメッセージ付きで終了します。終了ステータスは 1 固定です。

...#(標準出力)
#=> start
# start1...
# end1 with #<SystemExit: error1>
# start2...
# end2...
#終了ステータス:1
#(標準エラー出力)
#=> error1
# Traceback (most recent call last):
# sample.rb:11:in `<main>': RuntimeError (RuntimeError)
//}

@see Kernel.#exit,Kernel.#exit!...