ライブラリ
- ビルトイン (214)
- dbm (12)
- gdbm (12)
-
net
/ http (36) -
net
/ imap (84) - nkf (12)
- observer (12)
- pstore (12)
-
rinda
/ tuplespace (24) -
rubygems
/ commands / fetch _ command (12) -
rubygems
/ remote _ fetcher (216) -
rubygems
/ spec _ fetcher (168) -
rubygems
/ test _ utilities (24) - sdbm (12)
- socket (24)
- tsort (93)
-
yaml
/ dbm (24)
クラス
- Array (36)
- DBM (12)
- Data (6)
- GDBM (12)
-
Gem
:: RemoteFetcher (180) -
Gem
:: RemoteFetcher :: FetchError (24) -
Gem
:: SpecFetcher (156) - Hash (92)
- KeyError (16)
-
Net
:: IMAP (48) -
Net
:: IMAP :: FetchData (24) - PStore (12)
-
Rinda
:: TupleEntry (24) - SDBM (12)
- Socket (12)
- Thread (16)
-
YAML
:: DBM (24)
モジュール
-
Net
:: HTTPHeader (36) -
Socket
:: Constants (12) - TSort (93)
オブジェクト
- ENV (36)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - FakeFetcher (12)
- FetchCommand (12)
- FetchData (12)
- FetchError (12)
- KeyError (12)
-
MSG
_ ERRQUEUE (24) -
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 5 . 0 (8) - NKF (12)
- Observable (12)
- RemoteFetcher (12)
- SpecFetcher (12)
- [] (44)
- attr (12)
-
cache
_ dir (12) -
connection
_ for (12) - define (6)
- dir (12)
- download (12)
-
each
_ strongly _ connected _ component (23) -
each
_ strongly _ connected _ component _ from (23) - escape (12)
-
fetch
_ path (12) -
fetch
_ size (12) -
fetch
_ spec (12) -
fetch
_ values (20) - fetcher (24)
- fetcher= (24)
-
file
_ uri? (12) -
find
_ matching (12) -
get
_ file _ uri _ path (12) -
get
_ proxy _ from _ env (12) - key (8)
-
latest
_ specs (12) -
legacy
_ repos (12) - list (12)
-
load
_ specs (12) -
net
/ http (12) -
net
/ imap (12) - new (36)
-
normalize
_ uri (12) -
open
_ uri _ or _ path (12) - receiver (8)
- request (12)
- reset (12)
-
rubygems
/ commands / fetch _ command (12) -
rubygems
/ remote _ fetcher (12) -
rubygems
/ spec _ fetcher (12) - seqno (12)
- specs (12)
- store (12)
-
strongly
_ connected _ components (12) - tsort (24)
-
tsort
_ each (23) -
uid
_ fetch (12) -
uid
_ store (12) - unescape (12)
- uri (12)
-
warn
_ legacy (12)
検索結果
-
Hash
. new(ifnone = nil) -> Hash (1.0) -
空の新しいハッシュを生成します。ifnone はキーに対 応する値が存在しない時のデフォルト値です。設定したデフォルト値はHash#defaultで参照できます。
空の新しいハッシュを生成します。ifnone はキーに対
応する値が存在しない時のデフォルト値です。設定したデフォルト値はHash#defaultで参照できます。
ifnoneを省略した Hash.new は {} と同じです。
デフォルト値として、毎回同一のオブジェクトifnoneを返します。
それにより、一箇所のデフォルト値の変更が他の値のデフォルト値にも影響します。
//emlist[][ruby]{
h = Hash.new([])
h[0] << 0
h[1] << 1
p h.default #=> [0, 1]
//}
これを避けるには、破壊的でないメソッドで再代入する...