るりまサーチ

最速Rubyリファレンスマニュアル検索!
211件ヒット [101-200件を表示] (0.050秒)
トップページ > クエリ:Class[x] > クエリ:backtrace[x]

別のキーワード

  1. argf.class each_line
  2. argf.class each
  3. argf.class lines
  4. class new
  5. argf.class gets

ライブラリ

クラス

モジュール

検索結果

<< < 1 2 3 > >>

Kernel.#raise(error_type, message = nil, backtrace = caller(0), cause: $!) -> () (114.0)

例外を発生させます。 発生した例外は変数 $! に格納されます。また例外が 発生した時のスタックトレースは変数 $@ に格納され ます。発生した例外は rescue 節で捕捉できます。

...スまたは例外クラスのインスタンスで指定します。
@param message 例外のメッセージとなる文字列です。
@param backtrace 例外発生時のスタックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。
@param cau...
...y
else
print 'in else.'
ensure
print "in ensure.\n"
end

foo(4) #=> in method.in rescue.in method.in else.in ensure.
//}

//emlist[例3][ruby]{
class
MyException
def exception(mesg=nil)
SecurityError.new(mesg)
end
end

begin
raise MyException.new
rescue SecurityError
p $! #=> #<Secur...

Ruby用語集 (114.0)

Ruby用語集 A B C D E F G I J M N O R S Y

...

https://mruby.org/

: main
トップレベルにおける self。Object クラスのインスタンスである。

===[a:N] N

: nil
NilClass の唯一のインスタンス。また、そのオブジェクトを指す擬似変数の名前。
論理値としては偽である。

Ruby...
...する。

オブジェクト空間に関する情報は ObjectSpace クラスで得ることが
できる。

: オープンクラス
: open class
組込みのクラスが再定義可能であること。
Ruby は String や Integer といった基本的なクラスも自由に改変でき...
...発生した時点までのスタックトレースを保持しており、
Exception#backtrace や Exception#backtrace_locations で
取り出すことができる。

: スーパークラス
: superclass
クラス B がクラス A のサブクラスであるとき、A を B のスーパー...

NEWS for Ruby 3.1.0 (66.0)

NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...* Class
* 新規メソッド
* Class#subclassesはレシーバを継承した子クラスを要素に持つ配列(シングルトンクラスを含まない)を返します。

//emlist[Class#subclasses][ruby]{
class
A; end
class
B < A; end
class
C < B; end
class
D < A; end
A.subclasses...
...#=> [D, B]
B.subclasses #=> [C]
C.subclasses #=> []
//}

* Enumerable
* 新規メソッド
* Enumerable#compactが追加されました。 17312
* Enumerable#tallyがカウント集計用のハッシュオブジェクトを任意で渡せるようになりました。 1774...
...thread_id が追加されました。 17853

* Thread::Backtrace
* 新規メソッド
* --backtrace-limit コマンドラインオプションで設定したバックトレースの長さを制限する値を返す Thread::Backtrace.limit が追加されました。 17479

* Thread::Qu...

NEWS for Ruby 2.0.0 (54.0)

NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...' で始まる使用されていない変数は警告しなくなりました

=== 組み込みクラスの更新

* ARGF.class
* 追加: ARGF.class#codepoints, ARGF.class#each_codepoint
IO にある同名のメソッドに対応します

* Array
* 追加: Array#bsearch 二分探...
...した。そのようなときは ThreadError が発生します
* Mutex#sleep may spurious wakeup. Check after wakeup.

* NilClass
* 追加: NilClass#to_h 空のハッシュを返します

* ObjectSpace::WeakMap
* 弱い参照を保持するための低レベルのクラスです...
...handling of exceptions
* 追加: Thread#backtrace_locations Kernel#caller_locations に似た情報を返します
* 新規クラス: Thread::Backtrace::Location to hold backtrace location
information. These are returned by Thread#backtrace_locations and
Kernel#caller_locations...

Exception#==(other) -> bool (46.0)

自身と指定された other のクラスが同じであり、 message と backtrace が == メソッドで比較して 等しい場合に true を返します。そうでない場合に false を返します。

...自身と指定された other のクラスが同じであり、
message と backtrace が == メソッドで比較して
等しい場合に true を返します。そうでない場合に false を返します。

@param other 自身と比較したいオブジェクトを指定します。...
...{ |e| e.class }
# => [RuntimeError, RuntimeError, RuntimeError]
p results.map { |e| e.message }
# => ["2 is not long month", "2 is not long month", "4 is not long month"]

# class, message, backtrace が同一のため true になる
p results[0] == results[1] # => true

# class, backtrace が同...

絞り込み条件を変える

NEWS for Ruby 2.3.0 (18.0)

NEWS for Ruby 2.3.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...#positive?, Numeric#negative? を追加
11151

* Proc
* Proc#call ( Proc#[] , Proc#===, Proc#yield) は最適化されました。
Backtrace
doesn't show each method (show block lines directly).
TracePoint also ignores these calls.
11569

* Queue (Thread::Queue)
*...
...bjectSpace (objspace)
* ObjectSpace.#count_symbols を追加。
* ObjectSpace.#count_imemo_objects を追加。
* ObjectSpace.#internal_class_of を追加。
* ObjectSpace.#internal_super_of を追加。

* OpenSSL
* OpenSSL::SSL::SSLSocket#accept_nonblock と
OpenSSL::SS...
...$SAFE=3 が廃止されました。$SAFE を2以上にすると ArgumentError が発生します。
5455

=== C API の更新

* rb_define_class_id_under() は既にクラスが定義済みなのに、
そのスーパークラスが与えられたスーパークラスと一致しない...

Kernel.#fail -> () (14.0)

例外を発生させます。 発生した例外は変数 $! に格納されます。また例外が 発生した時のスタックトレースは変数 $@ に格納され ます。発生した例外は rescue 節で捕捉できます。

...スまたは例外クラスのインスタンスで指定します。
@param message 例外のメッセージとなる文字列です。
@param backtrace 例外発生時のスタックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。
@param cau...
...y
else
print 'in else.'
ensure
print "in ensure.\n"
end

foo(4) #=> in method.in rescue.in method.in else.in ensure.
//}

//emlist[例3][ruby]{
class
MyException
def exception(mesg=nil)
SecurityError.new(mesg)
end
end

begin
raise MyException.new
rescue SecurityError
p $! #=> #<Secur...

Kernel.#fail(message, cause: $!) -> () (14.0)

例外を発生させます。 発生した例外は変数 $! に格納されます。また例外が 発生した時のスタックトレースは変数 $@ に格納され ます。発生した例外は rescue 節で捕捉できます。

...スまたは例外クラスのインスタンスで指定します。
@param message 例外のメッセージとなる文字列です。
@param backtrace 例外発生時のスタックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。
@param cau...
...y
else
print 'in else.'
ensure
print "in ensure.\n"
end

foo(4) #=> in method.in rescue.in method.in else.in ensure.
//}

//emlist[例3][ruby]{
class
MyException
def exception(mesg=nil)
SecurityError.new(mesg)
end
end

begin
raise MyException.new
rescue SecurityError
p $! #=> #<Secur...

Kernel.#raise -> () (14.0)

例外を発生させます。 発生した例外は変数 $! に格納されます。また例外が 発生した時のスタックトレースは変数 $@ に格納され ます。発生した例外は rescue 節で捕捉できます。

...スまたは例外クラスのインスタンスで指定します。
@param message 例外のメッセージとなる文字列です。
@param backtrace 例外発生時のスタックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。
@param cau...
...y
else
print 'in else.'
ensure
print "in ensure.\n"
end

foo(4) #=> in method.in rescue.in method.in else.in ensure.
//}

//emlist[例3][ruby]{
class
MyException
def exception(mesg=nil)
SecurityError.new(mesg)
end
end

begin
raise MyException.new
rescue SecurityError
p $! #=> #<Secur...

Kernel.#raise(message, cause: $!) -> () (14.0)

例外を発生させます。 発生した例外は変数 $! に格納されます。また例外が 発生した時のスタックトレースは変数 $@ に格納され ます。発生した例外は rescue 節で捕捉できます。

...スまたは例外クラスのインスタンスで指定します。
@param message 例外のメッセージとなる文字列です。
@param backtrace 例外発生時のスタックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。
@param cau...
...y
else
print 'in else.'
ensure
print "in ensure.\n"
end

foo(4) #=> in method.in rescue.in method.in else.in ensure.
//}

//emlist[例3][ruby]{
class
MyException
def exception(mesg=nil)
SecurityError.new(mesg)
end
end

begin
raise MyException.new
rescue SecurityError
p $! #=> #<Secur...

絞り込み条件を変える

Kernel$$ERROR_INFO -> Exception | nil (12.0)

$! の別名

...$! の別名

require "English"
class
SomethingError < StandardError; end

begin
raise SomethingError
rescue
p $ERROR_INFO.backtrace #=> ["sample.rb:5"]
p $ERROR_INFO.to_s #=> "SomethingError"
end...
<< < 1 2 3 > >>