5178件ヒット
[1-100件を表示]
(0.056秒)
ライブラリ
- ビルトイン (2278)
- abbrev (24)
-
cgi
/ core (48) - coverage (24)
- csv (255)
- date (124)
- dbm (36)
- drb (36)
-
drb
/ extservm (12) - erb (16)
- etc (12)
- forwardable (48)
- gdbm (48)
- ipaddr (12)
- json (228)
-
json
/ add / bigdecimal (24) -
json
/ add / complex (24) -
json
/ add / date (24) -
json
/ add / date _ time (24) -
json
/ add / exception (24) -
json
/ add / ostruct (24) -
json
/ add / range (24) -
json
/ add / rational (24) -
json
/ add / regexp (24) -
json
/ add / struct (24) -
json
/ add / symbol (24) -
json
/ add / time (24) -
minitest
/ unit (1) - mkmf (60)
-
net
/ http (84) -
net
/ imap (48) - objspace (36)
- open-uri (24)
- open3 (108)
- openssl (48)
- optparse (60)
- ostruct (46)
- pstore (72)
- psych (19)
- rake (48)
- rbconfig (24)
-
rdoc
/ context (24) -
rdoc
/ markup / to _ html _ crossref (12) -
rdoc
/ text (12) -
rdoc
/ top _ level (12) -
rexml
/ document (96) -
rexml
/ sax2listener (12) -
rexml
/ streamlistener (12) -
rinda
/ rinda (48) -
rinda
/ tuplespace (48) -
rubygems
/ command (24) -
rubygems
/ commands / dependency _ command (12) -
rubygems
/ dependency _ list (12) -
rubygems
/ remote _ fetcher (12) -
rubygems
/ security (12) -
rubygems
/ source _ index (12) -
rubygems
/ source _ info _ cache (36) -
rubygems
/ specification (12) - sdbm (48)
- set (5)
- sync (12)
- tsort (93)
- uri (168)
-
webrick
/ accesslog (12) -
webrick
/ cgi (12) -
webrick
/ httprequest (24) -
webrick
/ httputils (24) - win32ole (12)
-
yaml
/ dbm (24) -
yaml
/ store (21)
クラス
- Array (82)
- BigDecimal (24)
- CGI (36)
-
CGI
:: Cookie (12) - CSV (240)
-
CSV
:: Row (15) - Complex (24)
- Coverage (24)
- DBM (36)
-
DRb
:: DRbServer (24) -
DRb
:: ExtServManager (12) - Data (6)
- Date (134)
- DateTime (38)
- ERB (16)
-
Encoding
:: Converter (48) - Exception (24)
- GDBM (48)
-
Gem
:: Command (24) -
Gem
:: Commands :: DependencyCommand (12) -
Gem
:: DependencyList (12) -
Gem
:: RemoteFetcher (12) -
Gem
:: SourceIndex (12) -
Gem
:: SourceInfoCache (36) -
Gem
:: Specification (12) - Hash (1071)
- IO (168)
- IPAddr (12)
-
JSON
:: Parser (12) -
JSON
:: State (24) - KeyError (16)
- MatchData (14)
-
MiniTest
:: Unit (1) -
Net
:: HTTP (12) -
Net
:: HTTPRequest (12) -
Net
:: IMAP (48) - Numeric (12)
- Object (48)
-
OpenSSL
:: Config (12) -
OpenSSL
:: X509 :: ExtensionFactory (36) - OpenStruct (70)
- OptionParser (48)
- PStore (72)
-
RDoc
:: Context (24) -
RDoc
:: Markup :: ToHtmlCrossref (12) -
RDoc
:: TopLevel (12) -
REXML
:: Document (12) -
REXML
:: Element (60) -
REXML
:: XPath (24) -
Rake
:: TaskArguments (48) - Range (24)
- Rational (36)
- Regexp (24)
-
Rinda
:: TupleSpace (48) -
Rinda
:: TupleSpaceProxy (48) -
RubyVM
:: InstructionSequence (60) - SDBM (36)
- Set (8)
- String (240)
- Struct (44)
- Symbol (24)
- Thread (12)
- Time (38)
-
URI
:: FTP (24) -
URI
:: Generic (48) -
URI
:: HTTP (24) -
URI
:: LDAP (24) -
URI
:: MailTo (24) -
WEBrick
:: CGI (12) -
WEBrick
:: HTTPRequest (24) - WIN32OLE (12)
-
YAML
:: DBM (24) -
YAML
:: Store (21)
モジュール
- Abbrev (12)
-
CGI
:: QueryExtension (12) - DRb (12)
- Enumerable (55)
- Etc (12)
- Forwardable (24)
- GC (60)
-
GC
:: Profiler (12) -
Gem
:: Security (12) - JSON (60)
-
JSON
:: Generator :: GeneratorMethods :: Array (12) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (12) -
JSON
:: Generator :: GeneratorMethods :: Float (12) -
JSON
:: Generator :: GeneratorMethods :: Hash (12) -
JSON
:: Generator :: GeneratorMethods :: Integer (12) -
JSON
:: Generator :: GeneratorMethods :: NilClass (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String (24) -
JSON
:: Generator :: GeneratorMethods :: String :: Extend (12) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) - Kernel (240)
- Marshal (24)
-
Net
:: HTTPHeader (60) - ObjectSpace (48)
- Open3 (108)
- OpenURI (24)
-
OptionParser
:: Arguable (12) - Psych (19)
-
RDoc
:: Text (12) -
REXML
:: SAX2Listener (12) -
REXML
:: StreamListener (12) - RbConfig (24)
- Signal (12)
- SingleForwardable (24)
-
Sync
_ m (12) - TSort (93)
- URI (24)
-
WEBrick
:: AccessLog (12) -
WEBrick
:: HTTPUtils (24)
オブジェクト
- ENV (109)
キーワード
- % (12)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - < (10)
- << (12)
- <= (10)
- == (12)
- === (12)
- > (10)
- >= (10)
- CONFIG (12)
- Hash (12)
-
MARSHAL
_ FIELDS (12) - Marshal フォーマット (12)
-
NEWS for Ruby 3
. 0 . 0 (5) - Ruby用語集 (12)
- SDBM (12)
- [] (61)
- []= (36)
-
_ httpdate (12) -
_ iso8601 (12) -
_ jisx0301 (12) -
_ parse (12) -
_ rfc2822 (12) -
_ rfc3339 (12) -
_ rfc822 (12) -
_ strptime (24) -
_ xmlschema (12) - abbrev (24)
-
add
_ attributes (12) -
add
_ class _ or _ module (24) -
add
_ element (12) -
add
_ specs (12) - assoc (24)
- attributes (12)
- build (120)
- build2 (24)
-
build
_ self _ signed _ cert (12) -
cgi
/ session (12) - clone (12)
- collect (28)
- command= (12)
- compact (15)
- compact! (9)
-
compare
_ by _ identity (12) -
compare
_ by _ identity? (12) - compile (12)
-
compile
_ file (12) -
compile
_ option (12) -
compile
_ option= (12) - config (24)
- context (12)
- context= (12)
-
count
_ nodes (12) -
count
_ objects (12) -
count
_ objects _ size (12) -
count
_ tdata _ objects (12) -
create
_ ext _ from _ hash (12) -
create
_ extension (24) -
decode
_ www _ form (12) -
deconstruct
_ keys (20) - default (24)
- default= (12)
-
default
_ proc (12) -
default
_ proc= (12) - defaults= (12)
- delegate (24)
- delete (36)
-
delete
_ if (24) - difference (7)
- dig (40)
- dump (24)
- dup (12)
- each (48)
-
each
_ key (24) -
each
_ pair (24) -
each
_ strongly _ connected _ component (23) -
each
_ strongly _ connected _ component _ from (23) -
each
_ value (24) - encode (36)
-
encode
_ www _ form (12) - eql? (60)
- equal? (12)
- except (8)
- exec (48)
- fetch (108)
-
fetch
_ path (12) -
fetch
_ values (20) - filter (50)
- filter! (28)
-
find
_ gems (12) - flatten (12)
- foreach (24)
-
form
_ data= (12) - format (12)
-
from
_ state (12) - generate (24)
-
generate
_ line (12) - getopts (60)
- gsub (48)
- gsub! (48)
-
handle
_ interrupt (12) -
has
_ key? (12) -
has
_ value? (12) - header (12)
- include? (12)
- index (7)
- inspect (12)
- instance (24)
-
instance
_ delegate (12) - intersection (6)
- invert (12)
- invoke (12)
-
is
_ a? (12) -
json
_ create (156) -
keep
_ if (48) - key (20)
- key? (12)
- keys (12)
-
kind
_ of? (12) -
latest
_ gc _ info (24) - list (12)
-
load
_ mime _ types (12) - map (28)
- match (12)
- member? (12)
- merge (24)
- merge! (24)
- modifiable (12)
-
named
_ captures (12) - new (192)
- open (48)
-
open
_ uri (24) - out (12)
- params= (12)
- parse (48)
-
parse
_ header (12) -
parse
_ line (12) -
peek
_ result (12) - pipeline (12)
-
pipeline
_ r (24) -
pipeline
_ rw (24) -
pipeline
_ start (24) -
pipeline
_ w (24) - popen (168)
-
post
_ form (12) - pp (12)
-
pretty
_ generate (12) -
pretty
_ unparse (12) -
primitive
_ convert (48) -
process
_ args (1) - rassoc (24)
-
raw
_ data (12) - read (36)
-
read
_ all (24) -
read
_ cache _ data (12) - readlines (12)
- receiver (8)
- rehash (12)
- reject (60)
- reject! (24)
- replace (72)
- reset (8)
-
reset
_ cache _ for (12) - result (20)
-
result
_ with _ hash (8) -
rm
_ f (12) -
rm
_ rf (12) - root? (12)
- roots (12)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby2
_ keywords _ hash? (6) -
safe
_ load (19) - select (36)
- select! (48)
-
set
_ cache _ data (12) -
set
_ form _ data (12) -
setup
_ params (12) - shift (12)
-
single
_ delegate (12) - slice (15)
- spawn (48)
-
spec
_ predecessors (12) - sprintf (12)
-
start
_ element (12) -
start
_ service (12) - starttls (24)
- stat (24)
- store (12)
-
strip
_ hashes (12) -
strongly
_ connected _ components (12) - sub (36)
- sub! (36)
-
sync
_ sh _ locker (6) -
sync
_ sh _ locker= (6) - system (48)
- table (12)
-
tag
_ start (12) - take (24)
- tally (8)
-
to
_ a (12) -
to
_ h (33) -
to
_ hash (12) -
to
_ json (252) -
to
_ json _ raw (12) -
to
_ s (12) -
transform
_ keys (20) -
transform
_ keys! (20) -
transform
_ values (18) -
transform
_ values! (18) -
try
_ do (24) - tsort (24)
-
tsort
_ each (23) - uname (12)
- union (7)
-
unmatched
_ alias _ lists= (12) - unparse (12)
- update (48)
- value? (12)
- values (12)
-
values
_ at (12) -
verify
_ compaction _ references (6) -
with
_ defaults (12) - write (24)
- xsystem (12)
- yaml (12)
- | (12)
- パターンマッチ (12)
- リテラル (11)
検索結果
先頭5件
-
Object
# hash -> Integer (18207.0) -
オブジェクトのハッシュ値を返します。このハッシュ値は、Object#eql? と合わせて Hash クラスで、2つのオブジェクトを同一のキーとするか判定するために用いられます。
...オブジェクトのハッシュ値を返します。このハッシュ値は、Object#eql? と合わせて Hash クラスで、2つのオブジェクトを同一のキーとするか判定するために用いられます。
2つのオブジェクトのハッシュ値が異なるとき、直ち......eql?(B) ならば A.hash == B.hash
の関係が満たされている必要があります。
ただし、ハッシュのキーとして Integer, Symbol, String などの特定の組み込みクラスが使われるときは、組込みのハッシュ関数が使用され、hash メソッドは呼......します。
@return ハッシュ値を返します。Ruby 内部の固定長整数 fixnum に収まらない場合は切り捨てられます。
//emlist[][ruby]{
p self.hash #=> 2013505522753096494
p 0.hash #=> 2647535320520409998
p 0.0.hash #=> -2975129765814025835
p nil.hash #=> 240153142... -
Data
# hash -> Integer (18131.0) -
自身のハッシュ値を整数で返します。 Data#eql? で比較して等しいオブジェクトは同じハッシュ値を返します。
.../emlist[例][ruby]{
Dog = Data.define(:name, :age)
dog1 = Dog.new("Fred", 5)
p dog1.hash # => -3931425561194935428
dog2 = Dog.new("Fred", 5)
p dog2.hash # => -3931425561194935428
dog3 = Dog.new("Fred", 6)
p dog3.hash # => -4469132459285820530
//}
[注意] 本メソッドの記述は Data のサブ......クラスのインスタンスに対して呼び
出す事を想定しています。Data.define は Data のサブクラスを作成する点に
注意してください。
@see Object#hash... -
String
# hash -> Integer (18131.0) -
self のハッシュ値を返します。 eql? で等しい文字列は、常にハッシュ値も等しくなります。
...self のハッシュ値を返します。
eql? で等しい文字列は、常にハッシュ値も等しくなります。
//emlist[例][ruby]{
"test".hash # => 4038258770210371295
("te" + "st").hash == "test".hash # => true
//}
@see Hash... -
Rational
# hash -> Integer (18119.0) -
自身のハッシュ値を返します。
...自身のハッシュ値を返します。
@return ハッシュ値を返します。
@see Object#hash... -
Time
# hash -> Integer (18119.0) -
self のハッシュ値を返します。
...self のハッシュ値を返します。
@return ハッシュ値を返します。
@see Object#hash... -
IPAddr
# hash -> Integer (18113.0) -
ハッシュ値を返します。
...ハッシュ値を返します。
@see Object#hash... -
Hash
. ruby2 _ keywords _ hash?(hash) -> bool (15220.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 (15155.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 (15130.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 Obje... -
Hash
. new {|hash , key| . . . } -> Hash (9303.0) -
空の新しいハッシュを生成します。ブロックの評価結果がデフォルト値になりま す。設定したデフォルト値はHash#default_procで参照できます。
...値はHash#default_procで参照できます。
値が設定されていないハッシュ要素を参照するとその都度ブロックを
実行し、その結果を返します。
ブロックにはそのハッシュとハッシュを参照したときのキーが渡されます。
@raise Arg......ォルト値は全部同一のオブジェクトなので、
# 破壊的変更によって他のキーに対応する値も変更されます。
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]...