2598件ヒット
[101-200件を表示]
(0.218秒)
クラス
- Array (89)
- Bignum (3)
- Data (8)
- Encoding (11)
-
Encoding
:: Converter (44) -
Enumerator
:: ArithmeticSequence (6) - Float (11)
- Hash (1075)
- IO (154)
- KeyError (14)
- MatchData (22)
- Method (11)
- Module (5)
- Numeric (11)
- Object (66)
- Proc (16)
- Range (11)
- Rational (11)
- Regexp (22)
-
RubyVM
:: InstructionSequence (66) - String (220)
- Struct (41)
- Thread (11)
- Time (11)
- UnboundMethod (22)
モジュール
- Enumerable (71)
- GC (54)
-
GC
:: Profiler (11) - Kernel (165)
- Marshal (22)
- ObjectSpace (11)
- Signal (11)
オブジェクト
- ENV (226)
キーワード
- % (11)
- < (9)
- <= (9)
- == (11)
- === (11)
- > (9)
- >= (9)
- ENV (11)
- Enumerable (11)
- Hash (22)
- KeyError (11)
- Lazy (11)
- Numeric (11)
-
SCRIPT
_ LINES _ _ (11) - [] (34)
- []= (11)
- aliases (11)
- assoc (22)
- clear (11)
- clone (11)
- collect (24)
- compact (13)
- compact! (8)
-
compare
_ by _ identity (11) -
compare
_ by _ identity? (11) - compile (11)
-
compile
_ file (11) -
compile
_ option (11) -
compile
_ option= (11) -
count
_ objects (11) -
deconstruct
_ keys (2) - default (22)
- default= (11)
-
default
_ proc (11) -
default
_ proc= (11) - delete (22)
-
delete
_ if (22) - difference (6)
- dig (27)
- dump (22)
- dup (11)
- each (22)
-
each
_ key (22) -
each
_ pair (22) -
each
_ value (22) - empty? (11)
- encode (33)
- eql? (44)
- equal? (11)
- except (6)
- exec (44)
- fetch (33)
-
fetch
_ values (18) - filter (24)
- filter! (24)
- flatten (11)
- format (11)
-
group
_ by (22) - gsub (44)
- gsub! (44)
-
handle
_ interrupt (11) -
has
_ key? (11) -
has
_ value? (11) - include? (11)
- index (7)
- inspect (22)
- intersection (5)
- invert (22)
-
is
_ a? (11) -
keep
_ if (44) - key (18)
- key? (11)
- keys (11)
-
kind
_ of? (11) -
latest
_ gc _ info (22) - length (11)
- list (11)
- map (24)
- member? (11)
- merge (22)
- merge! (22)
-
named
_ captures (22) - new (36)
- owner (11)
- popen (154)
-
primitive
_ convert (44) - rassoc (22)
-
raw
_ data (11) - receiver (7)
- rehash (22)
- reject (44)
- reject! (22)
- replace (22)
-
ruby2
_ keywords (10) -
ruby2
_ keywords _ hash? (5) - select (44)
- select! (44)
- shift (11)
- size (11)
- slice (13)
- spawn (44)
- sprintf (11)
- stat (22)
- store (11)
- sub (33)
- sub! (33)
- system (44)
- tally (8)
-
to
_ a (22) -
to
_ h (89) -
to
_ hash (33) -
to
_ proc (9) -
to
_ s (22) -
transform
_ keys (17) -
transform
_ keys! (17) -
transform
_ values (16) -
transform
_ values! (16) -
try
_ convert (11) - union (6)
- update (22)
- value? (11)
- values (11)
-
values
_ at (11) -
verify
_ compaction _ references (5) - | (11)
検索結果
先頭5件
-
Struct
# hash -> Integer (26115.0) -
self が保持するメンバのハッシュ値を元にして算出した整数を返します。 self が保持するメンバの値が変化すればこのメソッドが返す値も変化します。
...が返す値も変化します。
//emlist[例][ruby]{
Dog = Struct.new(:name, :age)
dog = Dog.new("fred", 5)
p dog.hash #=> 7917421
dog.name = "john"
p dog.hash #=> -38913223
//}
[注意] 本メソッドの記述は Struct の下位クラスのインスタン... -
UnboundMethod
# hash -> Integer (26115.0) -
自身のハッシュ値を返します。
...自身のハッシュ値を返します。
//emlist[例][ruby]{
a = method(:==).unbind
b = method(:eql?).unbind
p a.eql? b # => true
p a.hash == b.hash # => true
p [a, b].uniq.size # => 1
//}... -
Rational
# hash -> Integer (26109.0) -
自身のハッシュ値を返します。
...自身のハッシュ値を返します。
@return ハッシュ値を返します。
@see Object#hash... -
Time
# hash -> Integer (26109.0) -
self のハッシュ値を返します。
...self のハッシュ値を返します。
@return ハッシュ値を返します。
@see Object#hash... -
Bignum
# hash -> Integer (26103.0) -
self のハッシュ値を返します。
self のハッシュ値を返します。 -
Enumerator
:: ArithmeticSequence # hash -> Integer (26103.0) -
自身のハッシュ値を返します。
自身のハッシュ値を返します。
begin, end, step, exclude_end? が等しい Enumerable::ArithmeticSequence は
同じハッシュ値を返します。 -
MatchData
# hash -> Integer (26103.0) -
self のマッチ対象になった文字列、元になった正規表現オブジェクト、マッチ した位置を元にハッシュ値を計算して返します。
self のマッチ対象になった文字列、元になった正規表現オブジェクト、マッチ
した位置を元にハッシュ値を計算して返します。 -
Proc
# hash -> Integer (26103.0) -
self のハッシュ値を返します。
self のハッシュ値を返します。
Proc オブジェクトの引数の情報を返します。
Proc オブジェクトが引数を取らなければ空の配列を返します。引数を取る場合は、配列の配列を返し、
各配列の要素は引数の種類に対応した以下のような Symbol と、引数名を表す Symbol の 2 要素です。
//emlist[][ruby]{
prc = proc{|x, y=42, *other|}
p prc.parameters # => x], [:opt, :y], [:rest, :other
prc = lambda{|x, y=42, *other|}
p prc.param... -
Hash
. ruby2 _ keywords _ hash?(hash) -> bool (23216.0) -
Module#ruby2_keywordsやProc#ruby2_keywordsによる ruby2_keywords フラグが設定されているかどうかを返します。
...れていません。
ruby 2.7.1 で追加されたため、ruby 2.7.0 では定義されていません。
//emlist[][ruby]{
ruby2_keywords def foo(*args)
Hash.ruby2_keywords_hash?(args.last)
end
foo(k: 1) # => true
foo({k: 1}) # => false
//}
@see Module#ruby2_keywords, Proc#ruby2_keywords... -
Hash
# to _ hash -> self (23151.0) -
self を返します。
...self を返します。
//emlist[例][ruby]{
hash = {}
p hash.to_hash # => {}
p hash.to_hash == hash # => true
//}
@see Object#to_hash, Hash#to_h... -
Hash
# rehash -> self (23114.0) -
キーのハッシュ値を再計算します。
...raise RuntimeError Hash#eachなどのイテレータの評価途中でrehashすると発生します。
@return selfを返します。
//emlist[例][ruby]{
a = [ "a", "b" ]
h = { a => 100 }
p h[a] #=> 100
a[0] = "z"
p h[a] #=> nil
h.rehash
p h[a] #=> 100
//}
@see Object#hash... -
Hash
. new {|hash , key| . . . } -> Hash (17292.0) -
空の新しいハッシュを生成します。ブロックの評価結果がデフォルト値になりま す。設定したデフォルト値はHash#default_procで参照できます。
...空の新しいハッシュを生成します。ブロックの評価結果がデフォルト値になりま
す。設定したデフォルト値はHash#default_procで参照できます。
値が設定されていないハッシュ要素を参照するとその都度ブロックを
実行し、そ......ォルト値は全部同一のオブジェクトなので、
# 破壊的変更によって他のキーに対応する値も変更されます。
h = Hash.new("foo")
p h[1] #=> "foo"
p h[1].object_id #=> 6127170
p h[1] << "bar" #=> "foobar"
p h[1] #=>......まだ無いキーが呼び出される度に
# ブロックを評価するので、全て別のオブジェクトになります。
h = Hash.new {|hash, key| hash[key] = "foo"}
p h[1] #=> "foo"
p h[1].object_id #=> 6126900
p h[1] << "bar" #=> "foobar"
p h[1]...