種類
- インスタンスメソッド (78)
- 特異メソッド (30)
- 文書 (18)
- クラス (8)
クラス
- Enumerator (6)
- Object (30)
- PP (24)
モジュール
- Enumerable (48)
キーワード
- HTTPLoopDetected (8)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 7 . 0 (6) - find (24)
- produce (6)
-
sharing
_ detection (12) -
sharing
_ detection= (12) - then (14)
-
yield
_ self (16)
検索結果
先頭4件
-
Object
# yield _ self -> Enumerator (12.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
...返します。
例えば条件によって値を捨てるのに使えます。
//emlist[][ruby]{
# 条件にあうので何もしない
1.yield_self.detect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}
@see Object#tap... -
Object
# yield _ self {|x| . . . } -> object (12.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
...返します。
例えば条件によって値を捨てるのに使えます。
//emlist[][ruby]{
# 条件にあうので何もしない
1.yield_self.detect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}
@see Object#tap... -
NEWS for Ruby 2
. 0 . 0 (6.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...IO#wait_readable は IO#wait の別名です。
* json
* 1.7.7 に更新
* net/http
* 新機能
* Proxies are now automatically detected from the http_proxy environment
variable. See Net::HTTP.new for details.
* gzip and deflate compression are now requested for al......r the Next Protocol Negotiation extension. Supported
with OpenSSL 1.0.1 and higher.
* OpenSSL::OPENSSL_FIPS allows client applications to detect whether OpenSSL
is FIPS-enabled. OpenSSL.fips_mode= allows turning on and off FIPS mode
manually in order to adapt to situations wher... -
NEWS for Ruby 2
. 7 . 0 (6.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...た。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 {|x| x.upcase }.map {|x| x + "!" }.eag...