51件ヒット
[1-51件を表示]
(0.022秒)
キーワード
-
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) -
ruby 1
. 6 feature (12)
検索結果
-
Thread
:: Queue (18034.0) -
Queue はスレッド間の FIFO(first in first out) の通信路です。ス レッドが空のキューを読み出そうとすると停止します。キューになんら かの情報が書き込まれると実行は再開されます。
...Queue はスレッド間の FIFO(first in first out) の通信路です。ス
レッドが空のキューを読み出そうとすると停止します。キューになんら
かの情報が書き込まれると実行は再開されます。
最大サイズが指定できる Queue のサブクラ......ス Thread::SizedQueue も提供されています。
=== 例
require 'thread'
q = Queue.new
th1 = Thread.start do
while resource = q.pop
puts resource
end
end
[:resource1, :resource2, :resource3, nil].each{|r|
q.push(r)
}
th1.join
実行すると以下のよ......うに出力します。
$ ruby que.rb
resource1
resource2
resource3... -
ruby 1
. 6 feature (210.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...ことがありま
した((<ruby-talk:40337>)), ((<ruby-core:00019>))
: 2002-09-11: Queue#((<Queue/pop>))
Queue#pop に競合状態の問題がありました ((<ruby-dev:17223>))
: 2002-09-11: SizedQueue.new
引数に 0 以下を受けつけるバグが修正されました。
: 2002-09-......or
ruby 1.7.3 (2002-10-04) [i586-linux]
: SizedQueue#deq, #shift
: SizedQueue#enq
追加(push, pop の別名)。これらが定義されていなかったため、enq などを
呼び出したときスーパークラス Queue の enq が実行されていました。
: 2002-09-11:......指定できるようになりました。((<ruby-talk:43513>))
この場合、$; を分割文字列として使用します。以前までは $; が有効にな
るのは引数省略時だけでした。
$; = ":"
p "a:b:c".split(nil)
=> -:2:in `split': bad separator (ArgumentError... -
NEWS for Ruby 2
. 3 . 0 (36.0) -
NEWS for Ruby 2.3.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...'t show each method (show block lines directly).
TracePoint also ignores these calls.
11569
* Queue (Thread::Queue)
* 終了を通知するために Queue#close(Thread::Queue#close) を追加
10600
* Regexp/String: Unicode のバージョンを 7.0.0 から 8.0.0 に更......tory_txt.html#label-2.5.1+-2F+2015-12-10
=== 組込みのグローバル変数の互換性に影響のある変更
* $SAFE
* $SAFE=2 と $SAFE=3 が廃止されました。$SAFE を2以上にすると ArgumentError が発生します。
5455
=== C API の更新
* rb_define_class_id... -
NEWS for Ruby 3
. 1 . 0 (30.0) -
NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...トレースの長さを制限する値を返す Thread::Backtrace.limit が追加されました。 17479
* Thread::Queue
* 変更されたメソッド
* Thread::Queue.new が、初期値のEnumerableオブジェクトを渡せるようになりました。 17327
* Time
* 変更......* TracePoint のコールバック中に再入を許す TracePoint.allow_reentry が追加されました。 15912
* $LOAD_PATH
* 変更されたメソッド
* $LOAD_PATH.resolve_feature_path が失敗時に例外を発生させなくなりました。 16043
* Fiber Scheduler......article][:title]
//}
jsonがnilの時、
//emlist{
$ ruby test.rb
test.rb:2:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError)
title = json[:article][:title]
^^^^^^^^^^
//}
json[:article] が返す時、
//emlist{
$ ruby test.rb
test.rb:2:in `<main>': undefined meth... -
NEWS for Ruby 2
. 5 . 0 (24.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...7688
* Process
* getrusage(2) が存在する場合 Process.#times の精度を改良しました 11952
* Process.last_status を追加。$? と同じです 14043
* Range
* Range.new no longer hides exceptions when comparing begin and
end with #<=> and raise a "bad value for......Thread.report_on_exception のデフォルト値がtrueになりました。
スレッドの終了時に捕捉していない例外の情報を $stderr に出力します。 14143
* Time
* Time.at は第2引数の精度を指定するための第3引数を指定できるようになり......シードを必要としない用途で有用です。9569
* Socket
* Socket::Ifaddr#vhid を追加 13803
* ConditionVariable, Queue, SizedQueue を速度向上のため再実装しました。
これらのクラスはStructのサブクラスではなくなりました。13552
==... -
NEWS for Ruby 3
. 0 . 0 (18.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...Turn them on with `-W:deprecated` (or with `-w` to show other warnings too).
16345
* `$SAFE` and `$KCODE` are now normal global variables with no special behavior.
C-API methods related to `$SAFE` have been removed.
16131 17136
* yield in singleton class definitions in methods is......#eql? are now defined and will return true for separate Proc instances if the procs were created from the same block. 14267
* Queue / SizedQueue
* Queue#pop, SizedQueue#push and related methods may now invoke the `block`/`unblock` scheduler hooks in a non-blocking context. 16786
* Ractor......dard library. 17303
* The issues of WEBrick will be handled at https://github.com/ruby/webrick
== C API updates
* C API functions related to `$SAFE` have been removed. 16131
* C API header file `ruby/ruby.h` was split. https://github.com/ruby/ruby/pull/2991 This should have no impact on ex...