るりまサーチ

最速Rubyリファレンスマニュアル検索!
67件ヒット [1-67件を表示] (0.125秒)
トップページ > クエリ:I[x] > クエリ:trace[x] > クエリ:skip[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. matrix i
  5. kernel $-i

ライブラリ

モジュール

キーワード

検索結果

MiniTest::Assertions#skip(message = nil, backtrace = caller) (24307.0)

このメソッドを呼び出したテストメソッドをスキップします。

...ます。

@param message メッセージを指定します。

@param backtrace 例外発生時のスタックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。

@raise MiniTest::Skip 必ず発生します。

@see Kernel.#raise...

Thread::Backtrace::Location#inspect -> String (9212.0)

Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文 字列に変換したオブジェクトを返します。

...:Backtrace::Location#to_s の結果を人間が読みやすいような文
字列に変換したオブジェクトを返します。

//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end

Foo.new(0..2).locations.m...
...ap do |call|
puts call.inspect
end

# => "path/to/foo.rb:5:in `initialize'"
# "path/to/foo.rb:9:in `new'"
# "path/to/foo.rb:9:in `<main>'"
//}...

Thread::Backtrace::Location (9048.0)

Ruby のフレームを表すクラスです。

...tions から生成されます。

//emlist[例1][ruby]{
# caller_locations.rb
def a(skip)
caller_locations(skip)
end
def b(skip)
a(skip)
end
def c(skip)
b(skip)
end

c(0..2).map do |call|
puts call.to_s
end
//}

例1の実行結果:

caller_locations.rb:2:in `a'
caller_locations.rb:5:in...
...ions.rb:8:in `c'

//emlist[例2][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end

Foo.new(0..2).locations.map do |call|
puts call.to_s
end
//}

例2の実行結果:

i
nit.rb:4:in `initialize'
i
nit.rb:8:in `new'
i
ni...
...t.rb:8:in `<main>'

=== 参考

* Ruby VM アドベントカレンダー #4 vm_backtrace.c: https://www.atdot.net/~ko1/diary/201212.html#d4...

Thread::Backtrace::Location#absolute_path -> String (6112.0)

self が表すフレームの絶対パスを返します。

...mlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end

Foo.new(0..2).locations.map do |call|
puts call.absolute_path
end

# => /path/to/foo.rb
# /path/to/foo.rb
# /path/to/foo.rb
//}

@see Thread::Backtrace::Locatio...

Thread::Backtrace::Location#base_label -> String (6112.0)

self が表すフレームの基本ラベルを返します。通常、 Thread::Backtrace::Location#label から修飾を取り除いたもので構成 されます。

...trace::Location#label から修飾を取り除いたもので構成
されます。

//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end

Foo.new(0..2).locations.map do |call|
puts call.base_label
end

# => ini...
...tialize
# new
# <main>
//}

@see Thread::Backtrace::Location#label...

絞り込み条件を変える

Thread::Backtrace::Location#to_s -> String (6112.0)

self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し ます。

...//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end

Foo.new(0..2).locations.map do |call|
puts call.to_s
end

# => path/to/foo.rb:5:in `initialize'
# path/to/foo.rb:9:in `new'
# path/to/foo.rb:9:in `<main>'
/...

ruby 1.8.4 feature (186.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...
# * [api]: 拡張ライブラリ API
# * [lib]: ライブラリ
* レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* only backward-compatibility
* 影...
...boundMethod#bind [bug]>))
* ((<ruby 1.8.4 feature/set_trace_func [bug]>))
* ((<ruby 1.8.4 feature/set_trace_func [change]>))
* ((<ruby 1.8.4 feature/printf [bug]>))
* ((<ruby 1.8.4 feature/Hash [bug]>))
* ((<ruby 1.8.4 feature/test [bug]>))
* ((<ruby 1.8.4 feature/File.identical? [new]>)...
...)

: File.identical? [new]
: FileTest.identical? [new]

test(?-, ...) の代替メソッドとして追加。

: File.split [change]
: File.basename [change]
: File.dirname [change]

#Tue Nov 22 14:46:57 2005 NAKAMURA Usaku <usa@ruby-lang.org>
#
# * file.c (rb_file_s_basename): skip slas...