32件ヒット
[1-32件を表示]
(0.028秒)
種類
- 文書 (15)
- クラス (11)
- インスタンスメソッド (6)
クラス
- ThreadsWait (6)
キーワード
- Enumerator (11)
-
NEWS for Ruby 3
. 0 . 0 (4) -
ruby 1
. 8 . 4 feature (11)
検索結果
-
ThreadsWait
# threads -> Array (21226.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 slee... -
NEWS for Ruby 3
. 0 . 0 (108.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...nly.
* Array
* The following methods now return Array instances instead of subclass instances when called on subclass instances: 6087
* Array#drop
* Array#drop_while
* Array#flatten
* Array#slice!
* Array#slice / Array#[]
* Array#take
* Array#take_whi......le
* Array#uniq
* Array#*
* Can be sliced with Enumerator::ArithmeticSequence
//emlist[][ruby]{
dirty_data = ['--', 'data1', '--', 'data2', '--', 'data3']
dirty_data[(1..).step(2)] # take each second element
# => ["data1", "data2", "data3"]
//}
* Binding
* Binding#eval when c......JIT-ed code when not necessary.
* GC-ing JIT-ed code is executed in a background thread.
* Reduce the number of locks between Ruby and JIT threads.
== Static analysis
=== RBS
* RBS is a new language for type definition of Ruby programs. It allows writing types of classes and modules wit... -
ruby 1
. 8 . 4 feature (42.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...hange]>))
* ((<ruby 1.8.4 feature/File.dirname (Win全般) [bug]>))
* ((<ruby 1.8.4 feature/File::Stat#pipe? [bug]>))
* ((<ruby 1.8.4 feature/Array#fill [bug]>))
* ((<ruby 1.8.4 feature/String#scan [bug]>))
* ((<ruby 1.8.4 feature/File.join [bug]>))
* ((<ruby 1.8.4 feature/Thread#pass [b......ていたのを修正。
: Array#fill [bug]
#Tue Nov 15 14:39:16 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
#
# * array.c (rb_ary_fill): should adjust array length correctly when
# an array is expanded in the fill process. [ruby-core:06625]
Arrayに対してfillとpopを繰......追加されました.
#Wed Dec 7 01:02:04 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
#
# * ext/tk/tcltklib.c: fix bug on switching threads and waiting on the
# deleted interpreter on vwait and tkwait command.
削除された Tk インタープリタに対して vwait や... -
Enumerator (18.0)
-
each 以外のメソッドにも Enumerable の機能を提供するためのラッパークラスです。 また、外部イテレータとしても使えます。
...モジュールは、 Module#include 先のクラスが持つ
each メソッドを元に様々なメソッドを提供します。
例えば Array#map は Array#each の繰り返しを元にして定義されます。
Enumerator を介することにより String#each_byte のような
異なる名......ます。
例えば以下のようなスレッドをまたいだ呼び出しはエラーになります。
//emlist[例][ruby]{
a = nil
Thread.new do
a = [1, 2, 3].each
a.next
end.join
p a.next
#=> t.rb:7:in `next': fiber called across threads (FiberError)
# from t.rb:7:in `<main>'
//}...