るりまサーチ

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

別のキーワード

  1. _builtin nil?
  2. nilclass nil?
  3. object nil?
  4. object nil
  5. _builtin nil

検索結果

<< 1 2 3 > >>

Net::HTTP#trace(path, initheader = nil) -> Net::HTTPResponse (18324.0)

サーバの path に TRACE リクエストを ヘッダを initheader として送ります。

...サーバの path に TRACE リクエストを
ヘッダを initheader として送ります。

レスポンスを Net::HTTPResponse のオブジェクト
で返します。

@param path リクエストを送るパスを文字列で与えます。
@param initheader リクエストのヘッダを「...
...文字列=>文字列」の
ハッシュで与えます。

@see Net::HTTP::Trace...

Thread#backtrace_locations(start = 0, length = nil) -> [Thread::Backtrace::Location] | nil (12609.0)

スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。

...スレッドの現在のバックトレースを Thread::Backtrace::Location の配
列で返します。

引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。

@param start 開始フレームの位置を数値で指定します...
...ocations と似ていますが、本メソッドは self に限定
した情報を返します。

//emlist[例][ruby]{
thread = Thread.new { sleep 1 }
thread.run
thread.backtrace_locations # => ["/path/to/test.rb:1:in `sleep'", "/path/to/test.rb:1:in `block in <main>'"]
//}

@see Thread::Backtrace:...
...:Location...

Thread#backtrace_locations(range) -> [Thread::Backtrace::Location] | nil (12509.0)

スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。

...スレッドの現在のバックトレースを Thread::Backtrace::Location の配
列で返します。

引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。

@param start 開始フレームの位置を数値で指定します...
...ocations と似ていますが、本メソッドは self に限定
した情報を返します。

//emlist[例][ruby]{
thread = Thread.new { sleep 1 }
thread.run
thread.backtrace_locations # => ["/path/to/test.rb:1:in `sleep'", "/path/to/test.rb:1:in `block in <main>'"]
//}

@see Thread::Backtrace:...
...:Location...

ObjectSpace.#trace_object_allocations_stop -> nil (12314.0)

オブジェクト割り当てのトレースを終了します。

...オブジェクト割り当てのトレースを終了します。

トレースを終了する為には、ObjectSpace.#trace_object_allocations_startを呼んだ回数分だけこのメソッドを呼ぶ必要があります。

@see ObjectSpace.#trace_object_allocations_start...

ObjectSpace.#trace_object_allocations_start -> nil (12308.0)

オブジェクト割り当てのトレースを開始します。

...オブジェクト割り当てのトレースを開始します。

@see ObjectSpace.#trace_object_allocations_stop...

絞り込み条件を変える

Kernel.#caller_locations(start = 1, length = nil) -> [Thread::Backtrace::Location] | nil (6525.0)

現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。

...現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。

@param start 開始フレームの位置を数値で指定します。

@param length 取得するフレームの個数を指定します。

@pa...
...1(start, length)
locations = caller_locations(start, length)
p locations
p locations.map(&:lineno)
p locations.map(&:path)
end

def test2(start, length)
test1(start, length)
end

def test3(start, length)
test2(start, length)
end

caller_locations # => []
test3(1, nil)
# => ["/Users/user/...
...(1, 2)
# => ["/Users/user/test.rb:9:in `test2'", "/Users/user/test.rb:13:in `test3'"]
# => [9, 13]
# => ["/Users/user/test.rb", "/Users/user/test.rb"]
test3(2, 1)
# => ["/Users/user/test.rb:13:in `test3'"]
# => [13]
# => ["/Users/user/test.rb"]
//}

@see Thread::Backtrace::Location, Kernel.#caller...

Kernel.#caller_locations(range) -> [Thread::Backtrace::Location] | nil (6425.0)

現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。

...現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。

@param start 開始フレームの位置を数値で指定します。

@param length 取得するフレームの個数を指定します。

@pa...
...1(start, length)
locations = caller_locations(start, length)
p locations
p locations.map(&:lineno)
p locations.map(&:path)
end

def test2(start, length)
test1(start, length)
end

def test3(start, length)
test2(start, length)
end

caller_locations # => []
test3(1, nil)
# => ["/Users/user/...
...(1, 2)
# => ["/Users/user/test.rb:9:in `test2'", "/Users/user/test.rb:13:in `test3'"]
# => [9, 13]
# => ["/Users/user/test.rb", "/Users/user/test.rb"]
test3(2, 1)
# => ["/Users/user/test.rb:13:in `test3'"]
# => [13]
# => ["/Users/user/test.rb"]
//}

@see Thread::Backtrace::Location, Kernel.#caller...

Rake.application -> Rake::Application (6212.0)

現在の Rake アプリケーションを返します。

...e 'pp'

task default: :test_rake_app
task :test_rake_app do
pp Rake.application
end

# => #<Rake::Application:0x31b0f18
# @default_loader=#<Rake::DefaultLoader:0x31b0c78>,
# @imported=[],
# @last_description=nil,
# @loaders=
# {".rb"=>#<Rake::DefaultLoader:0x31b0c18>,
#...
...,
# ".rake"=>#<Rake::DefaultLoader:0x31b0b10>},
# @name="rake",
# @options=#<OpenStruct rakelib=["rakelib"], trace_output=#<IO:<STDERR>>>,
# @original_dir="/path/to/dir",
# @pending_imports=[],
# @rakefile="rakefile",
# @rakefiles=["rakefile", "Rakefile", "rakefile.rb",...

Rake.application=(app) (6148.0)

現在の Rake アプリケーションをセットします。

...cation のインスタンスを指定します。

//emlist[][ruby]{
# Rakefile での記載例とする

require 'pp'

task default: :test_rake_app
task :test_rake_app do
app = Rake::Application.new
app.tty_output = true
Rake.application = app
pp Rake.application
end

# => #<Rake::Applicati...
...iption=nil,
# @loaders=
# {".rb"=>#<Rake::DefaultLoader:0x00005624e6c30bc0>,
# ".rf"=>#<Rake::DefaultLoader:0x00005624e6c30b48>,
# ".rake"=>#<Rake::DefaultLoader:0x00005624e6c30a80>},
# @name="rake",
# @options=
# #<OpenStruct always_multitask=false, backtrace=false...
...ate=false, ignore_system=false, job_stats=false, load_system=false, nosearch=false, rakelib=["rakelib"], show_all_tasks=false, show_prereqs=false, show_task_pattern=nil, show_tasks=nil, silent=false, suppress_backtrace_pattern=nil, thread_pool_size=20, trace=false, trace_output=#<IO:<STDERR>>, trace...

ObjectSpace.#allocation_sourcefile(object) -> String (6130.0)

objectの元となったソースファイル名を返します。

...nilを返します。

//emlist[例:test.rbというファイルで下記のスクリプトを実行した場合][ruby]{
require 'objspace'

ObjectSpace::trace_object_allocations_start
obj = Object.new
puts "file:#{ObjectSpace::allocation_sourcefile(obj)}" # => file:test.rb
ObjectSpace::trace_o...
...bject_allocations_stop
//}

@see ObjectSpace.#trace_object_allocations_start,
ObjectSpace.#trace_object_allocations_stop...

絞り込み条件を変える

<< 1 2 3 > >>