るりまサーチ

最速Rubyリファレンスマニュアル検索!
436件ヒット [1-100件を表示] (0.061秒)

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. dsa p
  5. rsa p

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

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

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

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

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

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

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

Matrix#trace -> Integer | Float | Rational | Complex (15236.0)

トレース (trace) を返します。

...トレース (trace) を返します。

行列のトレース (trace) とは、対角要素の和です。

//emlist[例][ruby]{
require 'matrix'
Matrix[[7,6], [3,9]].trace # => 16
//}

trace
は正方行列でのみ定義されます。

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が...

TracePoint#raised_exception -> Exception (9213.0)

発生した例外を返します。

...eError :raise イベントのためのイベントフックの外側で実行し
た場合に発生します。

//emlist[例][ruby]{
trace
= TracePoint.new(:raise) do |tp|
tp.raised_exception # => #<ZeroDivisionError: divided by 0>
end
trace
.enable
begin
0/0
rescue
end
//}...

Exception#backtrace_locations -> [Thread::Backtrace::Location] (9207.0)

バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。

...バックトレース情報を返します。Exception#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。

現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。

//emlist[例: test.rb][ruby]{
require...
...et_exception
return begin
yield
rescue => e
e
end
end

e = get_exception { check_long_month(2) }
p
e.backtrace_locations
# => ["test.rb:4:in `check_long_month'", "test.rb:15:in `block in <main>'", "test.rb:9:in `get_exception'", "test.rb:15:in `<main>'"]
//}

@see Exception#backtrace...

Tracer#set_get_line_procs(file, p = proc) (9202.0)

@todo

@todo

絞り込み条件を変える

TracePoint#inspect -> String (9119.0)

self の状態を人間に読みやすい文字列にして返します。

...self の状態を人間に読みやすい文字列にして返します。

//emlist[例][ruby]{
def foo(ret)
ret
end
trace
= TracePoint.new(:call) do |tp|
p
tp.inspect # "#<TracePoint:call `foo'@/path/to/test.rb:1>"
end
trace
.enable
foo 1
//}...

TracePoint#path -> String (9119.0)

イベントが発生したファイルのパスを返します。

...トが発生したファイルのパスを返します。

@raise RuntimeError イベントフックの外側で実行した場合に発生します。

//emlist[例][ruby]{
def foo(ret)
ret
end
trace
= TracePoint.new(:call) do |tp|
p
tp.path # => "/path/to/test.rb"
end
trace
.enable
foo 1
//}...

Exception#backtrace -> [String] (9107.0)

バックトレース情報を返します。

...)
* "#{sourcefile}:#{sourceline}"
(トップレベルの場合)

という形式の String の配列です。

//emlist[例][ruby]{
def methd
raise
end

begin
methd
rescue => e
p
e.backtrace
end

#=> ["filename.rb:2:in `methd'", "filename.rb:6"]
//}

@see Exception#backtrace_locations...

TracePoint#eval_script -> String | nil (9107.0)

script_compiledイベント発生時にコンパイルされたソースコードを返します。 ファイルから読み込んだ場合は、nilを返します。

...script_compiledイベント発生時にコンパイルされたソースコードを返します。
ファイルから読み込んだ場合は、nilを返します。

//emlist[例][ruby]{
Trace
Point.new(:script_compiled) do |tp|
p
tp.eval_script # => "puts 'hello'"
end.enable do
eval("puts 'he...
...llo'")
end
//}

@raise RuntimeError :script_compiled イベントのための
イベントフックの外側で実行した場合に発生します。...
<< 1 2 3 ... > >>