216件ヒット
[1-100件を表示]
(0.045秒)
別のキーワード
種類
- インスタンスメソッド (99)
- モジュール関数 (66)
- 文書 (33)
- 特異メソッド (18)
クラス
- Coverage (7)
-
Net
:: POPMail (99)
モジュール
- Kernel (22)
- ObjectSpace (44)
- Psych (11)
キーワード
-
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 3
. 0 . 0 (4) -
allocation
_ sourcefile (11) -
allocation
_ sourceline (11) -
caller
_ locations (22) - load (11)
- mail (33)
- pop (33)
-
ruby 1
. 8 . 4 feature (11) -
trace
_ object _ allocations _ start (11) -
trace
_ object _ allocations _ stop (11)
検索結果
先頭5件
-
ObjectSpace
. # trace _ object _ allocations _ start -> nil (24401.0) -
オブジェクト割り当てのトレースを開始します。
...オブジェクト割り当てのトレースを開始します。
@see ObjectSpace.#trace_object_allocations_stop... -
Kernel
. # caller _ locations(start = 1 , length = nil) -> [Thread :: Backtrace :: Location] | nil (18643.0) -
現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。
...現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレームの個数を指定します。
@pa......[例][ruby]{
def test1(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......(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 (18543.0) -
現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。
...現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレームの個数を指定します。
@pa......[例][ruby]{
def test1(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......(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... -
Net
:: POPMail # all(io) -> object (18357.0) -
メールを受信します。
...込みます。
通常 IO オブジェクトを渡します。
この場合引数として渡したオブジェクトを返します。
pop, all, mail はすべて同じ効果ですが、
all と mail は obsolete です。
使用例:
require 'net/pop'
Net::POP3.start('pop.example.com', 110.......pop
end
}
ブロックを利用する例:
require 'net/pop'
Net::POP3.start('pop.example.com', 110) {|pop|
pop.each_mail do |m|
m.pop do |str|
print str
end
end
}
@param io メールの内容を書きこむオブジェクト
@raise TimeoutError 通信が... -
Coverage
. start(option = {}) -> nil (18331.0) -
カバレッジの測定を開始します。既に実行されていた場合には何も起こりません。 ただし、カバレッジ計測中に測定対象を変更しようとした場合は、RuntimeError となります。
...計測中に測定対象を変更しようとした場合は、RuntimeError となります。
@param option カバレッジの計測モードを指定します。
:all か "all" を指定すると、全ての種類を計測します。
個別に指定する場合は、......erage.start(:all)
load "bool.rb"
bool(0)
pp Coverage.result
# {"bool.rb"=>
# {:lines=>[1, 1, 1, nil, 0, nil, nil],
# :branches=>
# {[:if, 0, 2, 2, 6, 5]=>
# {[:then, 1, 3, 4, 3, 8]=>1, [:else, 2, 5, 4, 5, 9]=>0}},
# :methods=>{[Object, :bool, 1, 0, 7, 3]=>1}}}
Coverage.start(metho... -
ObjectSpace
. # allocation _ sourcefile(object) -> String (18312.0) -
objectの元となったソースファイル名を返します。
...uire 'objspace'
ObjectSpace::trace_object_allocations_start
obj = Object.new
puts "file:#{ObjectSpace::allocation_sourcefile(obj)}" # => file:test.rb
ObjectSpace::trace_object_allocations_stop
//}
@see ObjectSpace.#trace_object_allocations_start,
ObjectSpace.#trace_object_allocations_stop... -
ObjectSpace
. # allocation _ sourceline(object) -> Integer (18312.0) -
objectの元となったソースファイルの行番号を返します。
...y]{
require 'objspace'
ObjectSpace::trace_object_allocations_start
obj = Object.new
puts "line:#{ObjectSpace::allocation_sourceline(obj)}" # => line:4
ObjectSpace::trace_object_allocations_stop
//}
@see ObjectSpace.#trace_object_allocations_start,
ObjectSpace.#trace_object_allocations_stop... -
ObjectSpace
. # trace _ object _ allocations _ stop -> nil (18312.0) -
オブジェクト割り当てのトレースを終了します。
...オブジェクト割り当てのトレースを終了します。
トレースを終了する為には、ObjectSpace.#trace_object_allocations_startを呼んだ回数分だけこのメソッドを呼ぶ必要があります。
@see ObjectSpace.#trace_object_allocations_start... -
Net
:: POPMail # all -> String (18157.0) -
メールを受信します。
...込みます。
通常 IO オブジェクトを渡します。
この場合引数として渡したオブジェクトを返します。
pop, all, mail はすべて同じ効果ですが、
all と mail は obsolete です。
使用例:
require 'net/pop'
Net::POP3.start('pop.example.com', 110.......pop
end
}
ブロックを利用する例:
require 'net/pop'
Net::POP3.start('pop.example.com', 110) {|pop|
pop.each_mail do |m|
m.pop do |str|
print str
end
end
}
@param io メールの内容を書きこむオブジェクト
@raise TimeoutError 通信が... -
Net
:: POPMail # all {|str| . . . . } -> nil (18157.0) -
メールを受信します。
...込みます。
通常 IO オブジェクトを渡します。
この場合引数として渡したオブジェクトを返します。
pop, all, mail はすべて同じ効果ですが、
all と mail は obsolete です。
使用例:
require 'net/pop'
Net::POP3.start('pop.example.com', 110.......pop
end
}
ブロックを利用する例:
require 'net/pop'
Net::POP3.start('pop.example.com', 110) {|pop|
pop.each_mail do |m|
m.pop do |str|
print str
end
end
}
@param io メールの内容を書きこむオブジェクト
@raise TimeoutError 通信が...