42件ヒット
[1-42件を表示]
(0.051秒)
種類
- 文書 (37)
- インスタンスメソッド (5)
ライブラリ
- ビルトイン (5)
クラス
キーワード
-
NEWS for Ruby 2
. 3 . 0 (9) -
NEWS for Ruby 2
. 4 . 0 (8) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) -
ruby 1
. 9 feature (11)
検索結果
先頭5件
-
Enumerator
:: Yielder # to _ proc -> Proc (21135.0) -
Enumerator.new で使うメソッドです。
...
Enumerator.new で使うメソッドです。
引数を Enumerator::Yielder#yield に渡す Proc を返します。
これは Enumerator::Yielder オブジェクトを他のメソッドにブロック引数と
して直接渡すために使えます。
//emlist[例][ruby]{
text = <<-END
Hello
こ......んにちは
END
enum = Enumerator.new do |y|
text.each_line(&y)
end
enum.each do |line|
p line
end
# => "Hello\n"
# "こんにちは\n"
//}... -
NEWS for Ruby 2
. 7 . 0 (90.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...>1}
//}
* Enumerator
* 新規メソッド
* 任意のデータ変換からEnumeratorを作成するための
Enumerator.produceメソッドが追加されました。 14781
* lazy enumerator から lazy ではない enumerator を生成する
Enumerator::Lazy#eager......ドが追加されました。 15901
* Enumerator::Yielder#to_procメソッドが追加され、Yielder オブジェクトを
直接他のメソッドのブロック引数として渡せるようになりました。 15618
* Enumerator::Lazy#with_indexメソッドが追加され......ト実装から
lazyになりました。7877
//emlist[Enumerator.produce][ruby]{
require "date"
dates = Enumerator.produce(Date.today, &:succ) #=> infinite sequence of dates
dates.detect(&:tuesday?) #=> next Tuesday
//}
//emlist[Enumerator::Lazy#eager][ruby]{
a = %w(foo bar baz)
e = a.lazy.map {|... -
NEWS for Ruby 2
. 4 . 0 (30.0) -
NEWS for Ruby 2.4.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...い。
== 2.3.0 以降の変更
=== 言語仕様の変更
* 条件式での多重代入ができるようになりました 10617
* Symbol#to_proc でメソッド呼び出し元での Refinements が有効になりました 9451
* Object#send や BasicObject#__send__ でメソッドを呼......クを省略した場合 Enumerator を返すようになりました。2172
* Enumerable#sum を追加 12217
* Enumerable#uniq を追加 11090
* Enumerator::Lazy
* Enumerator::Lazy#chunk_while を追加 https://github.com/ruby/ruby/pull/1186
* Enumerator::Lazy#uniq を追加 1109... -
ruby 1
. 9 feature (24.0) -
ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。
...削除
=== 2006-06-11
: __callee__ [new]
: __method__ [new]
((<URL:http://www.dm4lab.to/~usa/ruby/d/200606a.html#id20060610_P1_7>))
: Symbol#to_proc
=== 2006-06-10
* 新機能
: BasicObject が導入されました [new]
: local という visibility および Module#local, Module#local_m......ruby-core:7365>))
=== 2006-02-03
: Integer#upto [compat]
: Integer#downto [compat]
: Integer#doitems [compat]
ブロックがなければ enumerator を返す
: Enumerable#group_by [new]
: Enumerable#first [new]
追加
=== 2006-01-26
: ((<BasicSocket/BasicSocket.do_not_reverse_l......なくなりました。
((<ruby-dev:25101>))
: Hash#hash [new]
追加 ((<ruby-talk:122482>))
=== 2004-12-03
: method(:y).to_proc.call{ p :ok }
Method#to_proc で作った ((<Proc>)) オブジェクトからメソッド y へと
ブロックが引き渡されるようになりました。... -
NEWS for Ruby 2
. 3 . 0 (18.0) -
NEWS for Ruby 2.3.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...c-cp-us; dummy) を追加
* Enumerable
* Enumerable#grep_v を追加
11049
* Enumerable#chunk_while
10769
* Enumerator::Lazy
* Enumerator::Lazy#grep_v を追加
11773
* File
* File.mkfifo
11536
* O_TMPFILE に対応する File::TMPFILE(File::Const......sh#fetch_values を追加
10017
* Hash#dig を追加
11643
* Hash#<=, Hash#<, Hash#>=, Hash#> を追加
10984
* Hash#to_proc を追加
11653
* IO
* 新しいフラグ File::SHARE_DELETE(File::Constants::SHARE_DELETE) が使用できます。
Windows... -
NEWS for Ruby 3
. 0 . 0 (12.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ray#slice!
* Array#slice / Array#[]
* Array#take
* Array#take_while
* Array#uniq
* Array#*
* Can be sliced with Enumerator::ArithmeticSequence
//emlist[][ruby]{
dirty_data = ['--', 'data1', '--', 'data2', '--', 'data3']
dirty_data[(1..).step(2)] # take each second......#sub
* String#succ / String#next
* String#swapcase
* String#tr
* String#tr_s
* String#upcase
* Symbol
* Symbol#to_proc now returns a lambda Proc. 16260
* Symbol#name has been added, which returns the name of the symbol if it is named. The returned string is...