ライブラリ
- ビルトイン (11)
- continuation (1)
- fiber (1)
-
irb
/ cmd / chws (2) - json (1)
- openssl (3)
- rake (1)
-
rubygems
/ dependency (1) -
rubygems
/ platform (1) -
rubygems
/ specification (1) - socket (6)
- thwait (9)
-
win32
/ registry (6)
クラス
- Fiber (1)
-
Gem
:: Dependency (1) -
Gem
:: Platform (1) -
Gem
:: Specification (1) -
IRB
:: ExtendCommand :: CurrentWorkingWorkspace (1) -
JSON
:: State (1) -
OpenSSL
:: X509 :: StoreContext (3) - Socket (3)
- Thread (9)
- ThreadsWait (9)
-
Win32
:: Registry (3)
モジュール
- Process (1)
-
Rake
:: TaskManager (1) -
Socket
:: Constants (3) -
Win32
:: Registry :: Constants (3)
キーワード
- CURRENT (1)
-
CURRENT
_ SPECIFICATION _ VERSION (1) - Continuation (1)
- CurrentWorkingWorkspace (1)
-
HKEY
_ PERFORMANCE _ DATA (2) -
HKEY
_ PERFORMANCE _ NLSTEXT (2) -
HKEY
_ PERFORMANCE _ TEXT (2) -
IPV6
_ PATHMTU (2) -
IPV6
_ RECVPATHMTU (2) -
IP
_ IPSEC _ POLICY (2) - TYPES (1)
- ThreadGroup (1)
- [] (1)
-
all
_ waits (3) -
current
_ cert (1) -
current
_ crl (1) -
current
_ scope (1) - depth (1)
- empty? (1)
- exec (1)
- execute (1)
- finished? (1)
- group (1)
- inspect (1)
- irb (1)
- join (1)
-
join
_ nowait (1) - keys (1)
- new (1)
- priority (1)
- priority= (1)
- rdoc (1)
-
ruby 1
. 6 feature (1) -
ruby 1
. 8 . 4 feature (1) -
set
_ trace _ func (1) - stop? (1)
- threads (1)
- verify (1)
- パターンマッチ (1)
検索結果
先頭5件
-
Fiber
. current -> Fiber (54412.0) -
このメソッドが評価されたコンテキストにおける Fiber のインスタンスを返します。
このメソッドが評価されたコンテキストにおける Fiber のインスタンスを返します。
//emlist[例:][ruby]{
fr = Fiber.new do
Fiber.current
end
fb = fr.resume
p fb.equal?(fr) # => true
p Fiber.current # => #<Fiber:0x91345e4>
p Fiber.current # => #<Fiber:0x91345e4>
//} -
Thread
. current -> Thread (54340.0) -
現在実行中のスレッド(カレントスレッド)を返します。
現在実行中のスレッド(カレントスレッド)を返します。
p Thread.current #=> #<Thread:0x4022e6fc run> -
Gem
:: Specification :: CURRENT _ SPECIFICATION _ VERSION -> 2 (45604.0) -
現在の gemspec のバージョンを表す定数です。
現在の gemspec のバージョンを表す定数です。 -
Rake
:: TaskManager # current _ scope -> Array (36622.0) -
現在のスコープを返します。
現在のスコープを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.current_scope # => LL()
end
//} -
IRB
:: ExtendCommand :: CurrentWorkingWorkspace (36049.0) -
irb 中の irb_current_working_workspace コマンドのための拡張を定義したク ラスです。
irb 中の irb_current_working_workspace コマンドのための拡張を定義したク
ラスです。 -
OpenSSL
:: X509 :: StoreContext # current _ cert -> OpenSSL :: X509 :: Certificate (27604.0) -
直前に検証した証明書のオブジェクトを返します。
直前に検証した証明書のオブジェクトを返します。
OpenSSL::X509::StoreContext#verify で検証が失敗した場合は
証明書チェイン中で検証に失敗した証明書のオブジェクトを返します。
証明書チェインの各証明書検証後
コールバック(OpenSSL::X509::Store#verify_callback=)呼び出しに
渡される StoreContext オブジェクトにこのメソッドを呼び出すと
直前に検証した証明書を返します。
OpenSSL::X509::StoreContext#verify を呼ぶ前に
このメソッドを呼ぶと空の OpenSSL::X509::Ce... -
OpenSSL
:: X509 :: StoreContext # current _ crl -> OpenSSL :: X509 :: CRL | nil (27604.0) -
直前に検証に利用した CRL のオブジェクトを返します。
直前に検証に利用した CRL のオブジェクトを返します。
証明書チェインの各証明書検証後
コールバック(OpenSSL::X509::Store#verify_callback=)呼び出しに
渡される StoreContext オブジェクトにこのメソッドを呼び出すと
直前に検証に利用した CRL オブジェクトを返します。 -
Gem
:: Dependency :: TYPES -> Array (27319.0) -
有効な依存関係の型を表す配列です。
有効な依存関係の型を表す配列です。
@see Gem::Specification::CURRENT_SPECIFICATION_VERSION -
Gem
:: Platform :: CURRENT -> String (27304.0) -
特定のプラットフォーム向けの Gem をビルドするときに使用します。
特定のプラットフォーム向けの Gem をビルドするときに使用します。 -
Thread
# group -> ThreadGroup (18637.0) -
スレッドが属している ThreadGroup オブジェクトを返します。
スレッドが属している ThreadGroup オブジェクトを返します。
p Thread.current.group == ThreadGroup::Default
# => true -
ThreadsWait
# empty? -> bool (18373.0) -
同期されるスレッドが存在するならば true をかえします。
同期されるスレッドが存在するならば true をかえします。
使用例
require 'thwait'
threads = []
3.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
thall = ThreadsWait.new
p thall.threads.empty? #=> true
thall.join(*threads)
p thall.threads.empty? #=> false -
JSON
:: State # depth -> Integer (18349.0) -
This integer returns the current depth of data structure nesting.
This integer returns the current depth of data structure nesting. -
Socket
:: Constants :: IPV6 _ PATHMTU -> Integer (18349.0) -
Retrieve current path MTU。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。
Retrieve current path MTU。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。
@see Socket::Constants::IPPROTO_IPV6,
3542 -
Socket
:: Constants :: IPV6 _ RECVPATHMTU -> Integer (18349.0) -
Receive current path MTU with datagram。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。
Receive current path MTU with datagram。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。
@see Socket::Constants::IPPROTO_IPV6,
3542 -
Socket
:: IPV6 _ PATHMTU -> Integer (18349.0) -
Retrieve current path MTU。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。
Retrieve current path MTU。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。
@see Socket::Constants::IPPROTO_IPV6,
3542 -
Socket
:: IPV6 _ RECVPATHMTU -> Integer (18349.0) -
Receive current path MTU with datagram。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。
Receive current path MTU with datagram。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。
@see Socket::Constants::IPPROTO_IPV6,
3542 -
Socket
:: Constants :: IP _ IPSEC _ POLICY -> Integer (18319.0) -
IPsec security policy。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。
IPsec security policy。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。
@see Socket::Constants::IPPROTO_IP,
http://netbsd.gw.com/cgi-bin/man-cgi?ip++NetBSD-current -
Socket
:: IP _ IPSEC _ POLICY -> Integer (18319.0) -
IPsec security policy。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。
IPsec security policy。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。
@see Socket::Constants::IPPROTO_IP,
http://netbsd.gw.com/cgi-bin/man-cgi?ip++NetBSD-current -
Thread
# inspect -> String (18319.0) -
自身を人間が読める形式に変換した文字列を返します。
自身を人間が読める形式に変換した文字列を返します。
//emlist[例][ruby]{
a = Thread.current
a.inspect # => "#<Thread:0x00007fdbaf07ddb0 run>"
b = Thread.new{}
b.inspect # => "#<Thread:0x00007fdbaf8f7d10@(irb):3 dead>"
//} -
Thread
# priority -> Integer (18319.0) -
スレッドの優先度を返します。この値が大きいほど優先度が高くなります。 メインスレッドのデフォルト値は 0 です。新しく生成されたスレッドは親スレッドの priority を引き継ぎます。
スレッドの優先度を返します。この値が大きいほど優先度が高くなります。
メインスレッドのデフォルト値は 0 です。新しく生成されたスレッドは親スレッドの
priority を引き継ぎます。
@param val スレッドの優先度を指定します。プラットフォームに依存します。
//emlist[例][ruby]{
Thread.current.priority # => 0
count1 = count2 = 0
a = Thread.new do
loop { count1 += 1 }
end
a.priority = -1
b = Thread.new do
... -
Thread
# priority=(val) (18319.0) -
スレッドの優先度を返します。この値が大きいほど優先度が高くなります。 メインスレッドのデフォルト値は 0 です。新しく生成されたスレッドは親スレッドの priority を引き継ぎます。
スレッドの優先度を返します。この値が大きいほど優先度が高くなります。
メインスレッドのデフォルト値は 0 です。新しく生成されたスレッドは親スレッドの
priority を引き継ぎます。
@param val スレッドの優先度を指定します。プラットフォームに依存します。
//emlist[例][ruby]{
Thread.current.priority # => 0
count1 = count2 = 0
a = Thread.new do
loop { count1 += 1 }
end
a.priority = -1
b = Thread.new do
... -
Thread
# stop? -> bool (18319.0) -
スレッドが終了(dead)あるいは停止(stop)している時、true を返します。
スレッドが終了(dead)あるいは停止(stop)している時、true を返します。
//emlist[例][ruby]{
a = Thread.new { Thread.stop }
b = Thread.current
a.stop? # => true
b.stop? # => false
//}
@see Thread#alive?, Thread#status -
ThreadGroup (18055.0)
-
スレッドグループを表すクラスです。グループに属する Thread をまとめて 操作することができます。
スレッドグループを表すクラスです。グループに属する Thread をまとめて
操作することができます。
Thread は必ずいずれかひとつのスレッドグループに属します。
生成されたばかりの Thread は、生成した Thread のグループを引き継ぎます。
メインスレッドはデフォルトでは ThreadGroup::Default に属します。
: 例:
生成したすべてのThreadが終了するのを待つ
5.times {
Thread.new { sleep 1; puts "#{Thread.current} finished" }
}
... -
IRB
:: ExtendCommand :: CurrentWorkingWorkspace # execute(*obj) -> obj (18001.0) -
irb の self を返します。
irb の self を返します。
@param obj 使用しません。 -
Win32
:: Registry :: Constants :: HKEY _ PERFORMANCE _ DATA (9307.0) -
@todo
@todo
定義済キー値。
これらは Integer で、Win32::Registry オブジェクトではありません。 -
Win32
:: Registry :: Constants :: HKEY _ PERFORMANCE _ NLSTEXT (9307.0) -
@todo
@todo
定義済キー値。
これらは Integer で、Win32::Registry オブジェクトではありません。 -
Win32
:: Registry :: Constants :: HKEY _ PERFORMANCE _ TEXT (9307.0) -
@todo
@todo
定義済キー値。
これらは Integer で、Win32::Registry オブジェクトではありません。 -
Win32
:: Registry :: HKEY _ PERFORMANCE _ DATA -> Win32 :: Registry (9307.0) -
@todo
@todo
それぞれの定義済キーを表す Win32::Registry オブジェクトです。
詳細は以下の MSDN Library を参照してください。
* Predefined Keys: http://msdn.microsoft.com/library/en-us/sysinfo/base/predefined_keys.asp -
Win32
:: Registry :: HKEY _ PERFORMANCE _ NLSTEXT -> Win32 :: Registry (9307.0) -
@todo
@todo
それぞれの定義済キーを表す Win32::Registry オブジェクトです。
詳細は以下の MSDN Library を参照してください。
* Predefined Keys: http://msdn.microsoft.com/library/en-us/sysinfo/base/predefined_keys.asp -
Win32
:: Registry :: HKEY _ PERFORMANCE _ TEXT -> Win32 :: Registry (9307.0) -
@todo
@todo
それぞれの定義済キーを表す Win32::Registry オブジェクトです。
詳細は以下の MSDN Library を参照してください。
* Predefined Keys: http://msdn.microsoft.com/library/en-us/sysinfo/base/predefined_keys.asp -
パターンマッチ (9067.0)
-
パターンマッチ * patterns * variable_binding * variable_pinning * matching_non_primitive_objects * guard_clauses * current_feature_status * pattern_syntax * some_undefined_behavior_examples
パターンマッチ
* patterns
* variable_binding
* variable_pinning
* matching_non_primitive_objects
* guard_clauses
* current_feature_status
* pattern_syntax
* some_undefined_behavior_examples
パターンマッチは、構造化された値に対して、構造をチェックし、マッチした部分をローカル変数に束縛するという、深いマッチを可能にする実験的な機能です。(『束縛』は、パターンマッチの輸入元である関数型言語... -
OpenSSL
:: X509 :: StoreContext # verify -> bool (9019.0) -
証明書を検証します。
証明書を検証します。
OpenSSL::X509::StoreContext.new で設定した証明書を検証します。
検証に成功した場合は true を、失敗した場合は false を返します。
検証の詳細な情報は
* OpenSSL::X509::StoreContext#error
* OpenSSL::X509::StoreContext#error_string
* OpenSSL::X509::StoreContext#chain
* OpenSSL::X509::StoreContext#current_crl -
Process
. exec(command , *args) -> () (9019.0) -
カレントプロセスを与えられた外部コマンドで置き換えます。
カレントプロセスを与えられた外部コマンドで置き換えます。
=== 引数の解釈
引数が一つだけ与えられた場合、command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます。
引数が複数与えられた場合、第 2 引数以降は command に直接渡され、
インタプリタから直接実行されます。
第 1 引数が 2 要素の配列の場合、第 1 要素の文字列が実際に起動する
プログラムのパスで、第 2 要素が「みせかけ... -
ruby 1
. 6 feature (2305.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
ruby 1.6 feature
ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン
になります。
((<stable-snapshot|URL:ftp://ftp.netlab.co.jp/pub/lang/ruby/stable-snapshot.tar.gz>)) は、日々更新される安定版の最新ソースです。
== 1.6.8 (2002-12-24) -> stable-snapshot
: 2003-01-22: errno
EAGAIN と EWOULDBLOCK が同じ値のシステムで、EWOULDBLOCK がなくなっ
ていま... -
Thread
# set _ trace _ func(pr) -> Proc | nil (673.0) -
スレッドにトレース用ハンドラを設定します。
スレッドにトレース用ハンドラを設定します。
nil を渡すとトレースを解除します。
設定したハンドラを返します。
//emlist[例][ruby]{
th = Thread.new do
class Trace
end
2.to_s
Thread.current.set_trace_func nil
3.to_s
end
th.set_trace_func lambda {|*arg| p arg }
th.join
# => ["line", "example.rb", 2, nil, #<Binding:0x00007fc8de87cb08>, nil]
#... -
ruby 1
. 8 . 4 feature (253.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
ruby 1.8.4 feature
ruby 1.8.4 での ruby 1.8.3 からの変更点です。
掲載方針
*バグ修正の影響も含めて動作が変わるものを収録する。
*単にバグを直しただけのものは収録しない。
*ライブラリへの単なる定数の追加は収録しない。
以下は各変更点に付けるべきタグです。
記号について(特に重要なものは大文字(主観))
# * カテゴリ
# * [ruby]: ruby インタプリタの変更
# * [api]: 拡張ライブラリ API
# * [lib]: ライブラリ
* レベル
* [bug]: バグ修正
* [new]: 追加され... -
Thread
# [](name) -> object | nil (145.0) -
name に対応したスレッドに固有のデータを取り出します。 name に対応するスレッド固有データがなければ nil を返し ます。
name に対応したスレッドに固有のデータを取り出します。
name に対応するスレッド固有データがなければ nil を返し
ます。
@param name スレッド固有データのキーを文字列か Symbol で指定します。
//emlist[例][ruby]{
[
Thread.new { Thread.current["name"] = "A" },
Thread.new { Thread.current[:name] = "B" },
Thread.new { Thread.current["name"] = "C" }
].each do |th|
th.join... -
ThreadsWait
# finished? -> bool (73.0) -
すでに終了したスレッドが存在すれば true を返します。
すでに終了したスレッドが存在すれば true を返します。
使用例
require 'thwait'
threads = []
3.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
thall = ThreadsWait.new(*threads)
p thall.finished? #=> false
sleep 3
p thall.finished? #=> true -
ThreadsWait
# join(*threads) -> () (73.0) -
終了を待つスレッドの対象として、threads で指定されたスレッドを指定します。
終了を待つスレッドの対象として、threads で指定されたスレッドを指定します。
@param threads 複数スレッドの終了を待つスレッドに指定されたthreadsを加えます。
require 'thwait'
threads = []
5.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
thall = ThreadsWait.new
p thall.threads #=> []
thall.join(*threads)
p thall.threads
... -
ThreadsWait
# join _ nowait(*threads) -> () (73.0) -
終了を待つスレッドの対象として、threads で指定されたスレッドを指定します。 しかし、実際には終了をまちません。
終了を待つスレッドの対象として、threads で指定されたスレッドを指定します。
しかし、実際には終了をまちません。
@param threads 複数スレッドの終了を待つスレッドに指定されたthreadsを加えます。
require 'thwait'
threads = []
5.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
thall = ThreadsWait.new
p thall.threads #=> []
thall.join_nowait(*thr... -
ThreadsWait
# threads -> Array (55.0) -
同期されるスレッドの一覧を配列で返します。
同期されるスレッドの一覧を配列で返します。
使用例
require 'thwait'
threads = []
3.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
thall = ThreadsWait.new(*threads)
p thall.threads
#=> [#<Thread:0x21750 sleep>, #<Thread:0x216c4 sleep>, #<Thread:0x21638 sleep>] -
irb (55.0)
-
irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
irb は Interactive Ruby の略です。
irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
=== irb の使い方
Ruby さえ知っていれば irb を使うのは簡単です。
irb コマンドを実行すると、以下のようなプロンプトが表れます。
$ irb
irb(main):001:0>
あとは Ruby の式を入力するだけで、その式が実行され、結果が表示されます。
irb(main):001:0> 1+2
3
irb(main):002:0> class Foo
irb(main):003:1> def f... -
Continuation (37.0)
-
継続を表すクラスです。
継続を表すクラスです。
Kernel.#callcc { |cont| ... } の呼び出し
は、直前の状態(ローカル変数の定義、スタックフレーム)を cont に記憶
してブロックを実行します。cont は、Continuation クラスのインスタ
ンスで、Continuation#call メソッドを実行するこ
とでいつでも記憶した状態を継続することができます。
C 言語の setjmp()/longjmp() がわかる人は
setjmp() == callcc {|c| }
longjmp() == c.call
と考えれば、わかりやすいかも知れません(ただし、callc... -
Thread
# keys -> [Symbol] (37.0) -
スレッド固有データに関連づけられたキーの配列を返します。キーは Symbol で返されます。
スレッド固有データに関連づけられたキーの配列を返します。キーは
Symbol で返されます。
th = Thread.current
th[:foo] = 'FOO'
th['bar'] = 'BAR'
p th.keys
#=> [:bar, :foo] -
ThreadsWait
# all _ waits -> () (37.0) -
指定されたスレッドすべてが終了するまで待ちます。 ブロックが与えられた場合、スレッド終了時にブロックを評価します。
指定されたスレッドすべてが終了するまで待ちます。
ブロックが与えられた場合、スレッド終了時にブロックを評価します。
使用例
require 'thwait'
threads = []
5.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
thall = ThreadsWait.new(*threads)
thall.all_waits{|th|
printf("end %s\n", th.inspect)
}
# 出力例
#=> #<Thread... -
ThreadsWait
. all _ waits(*threads) -> () (37.0) -
指定されたスレッドすべてが終了するまで待ちます。 ブロックが与えられた場合、スレッド終了時にブロックを評価します。
指定されたスレッドすべてが終了するまで待ちます。
ブロックが与えられた場合、スレッド終了時にブロックを評価します。
@param threads 終了するまでまつスレッドを一つもしくは複数指定します。
require 'thwait'
threads = []
5.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
ThreadsWait.all_waits(*threads) {|th| printf("end %s\n", th.inspect) }
# 出力例
#=... -
ThreadsWait
. all _ waits(*threads) {|thread| . . . } -> () (37.0) -
指定されたスレッドすべてが終了するまで待ちます。 ブロックが与えられた場合、スレッド終了時にブロックを評価します。
指定されたスレッドすべてが終了するまで待ちます。
ブロックが与えられた場合、スレッド終了時にブロックを評価します。
@param threads 終了するまでまつスレッドを一つもしくは複数指定します。
require 'thwait'
threads = []
5.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
ThreadsWait.all_waits(*threads) {|th| printf("end %s\n", th.inspect) }
# 出力例
#=... -
ThreadsWait
. new(*threads) -> ThreadsWait (37.0) -
指定されたスレッドの終了をまつための、スレッド同期オブジェクトをつくります。
指定されたスレッドの終了をまつための、スレッド同期オブジェクトをつくります。
@param threads 終了を待つスレッドを一つもしくは複数指定します。
使用例
require 'thwait'
threads = []
5.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
thall = ThreadsWait.new(*threads)
thall.all_waits{|th|
printf("end %s\n", th.inspect)
}
... -
rdoc (37.0)
-
RDoc は Ruby のドキュメント生成を行うためのライブラリです。rdoc という ドキュメント生成のためのコマンドも含んでいます。
RDoc は Ruby のドキュメント生成を行うためのライブラリです。rdoc という
ドキュメント生成のためのコマンドも含んでいます。
このパッケージは RDoc と Markup というふたつのコンポーネントを含
んでいます。 RDoc とは Ruby のソースファイルに対するドキュメントを生成
するアプリケーションです。 JavaDoc と同様に、ソースを解析し、クラス、モ
ジュール、メソッドの定義を抜き出してきます(include,require もです)。そ
してこれらの内容とその直前に書かれたコメントを併合し、ドキュメントを出
力します(現在は HTML しか出力できませんが、こ...