39件ヒット
[1-39件を表示]
(0.081秒)
ライブラリ
- ビルトイン (17)
-
fiddle
/ import (11) - resolv-replace (11)
クラス
- Binding (6)
- TracePoint (11)
- UDPSocket (11)
モジュール
-
Fiddle
:: Importer (11)
キーワード
- binding (11)
-
source
_ location (6)
検索結果
先頭5件
-
UDPSocket
# bind(host , port) -> Integer (18230.0) -
UDPSocket#bindのパラメータ host の名前解決に resolv ライブラリを使います。
...UDPSocket#bindのパラメータ host の名前解決に resolv
ライブラリを使います。
@param host bindするホスト名を文字列で指定します。
@param port bindするポートを指定します。
@raise SocketError 名前解決に失敗した場合に発生します。... -
Fiddle
:: Importer # bind(signature , *opts) { . . . } -> Fiddle :: Function (18144.0) -
Ruby のブロックを C の関数で wrap し、その関数をモジュールに インポートします。
...tion オブジェクトとして
取り出すことができます。
signature で関数の名前とシネグチャを指定します。例えば
"int compare(void*, void*)" のように指定します。
opts には :stdcall もしくは :cdecl を渡すことができ、
呼出規約を明示......"int qsort(void*, size_t, size_t, void*)"
bind("int compare(void*, void*)"){|px, py|
x = px.to_s(Fiddle::SIZEOF_INT).unpack("i!")
y = py.to_s(Fiddle::SIZEOF_INT).unpack("i!")
x <=> y
}
end
data = [32, 180001, -13, -1, 0, 49].pack("i!*")
M.qsort(Fiddle::Pointe......r[data], 6, Fiddle::SIZEOF_INT, M["compare"])
p data.unpack("i!*") # => [-13, -1, 0, 32, 49, 180001]... -
TracePoint
# binding -> Binding (9201.0) -
発生したイベントによって生成された Binding オブジェクトを返します。
...発生したイベントによって生成された Binding オブジェクトを返します。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:call) do |tp|
p tp.binding.local_variables # => [:ret]
end
trace.enable
foo 1
//}... -
TracePoint
# binding -> Binding | nil (9201.0) -
発生したイベントによって生成された Binding オブジェクトを返します。
...れた Binding オブジェクトを返します。
C で記述されたメソッドは binding を生成しないため、
:c_call および :c_return イベントに対しては nil を返すことに注意してください。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:......call) do |tp|
p tp.binding.local_variables # => [:ret]
end
trace.enable
foo 1
//}... -
Binding
# source _ location -> [String , Integer] (3101.0) -
self の Ruby のソースファイル名と行番号を返します。
...self の Ruby のソースファイル名と行番号を返します。
d:spec/variables#pseudo の __FILE__ と __LINE__ も参照してください。
//emlist[例][ruby]{
p binding.source_location # => ["test.rb", 1]
//}...