種類
ライブラリ
- ビルトイン (2245)
- abbrev (24)
- bigdecimal (12)
-
cgi
/ core (84) -
cgi
/ session (36) -
cgi
/ session / pstore (12) -
cgi
/ util (12) - coverage (24)
- csv (267)
- date (124)
- dbm (48)
- drb (36)
-
drb
/ extservm (24) -
drb
/ gw (12) - erb (16)
- etc (12)
- forwardable (48)
- gdbm (48)
- ipaddr (12)
- irb (12)
-
irb
/ inspector (12) - json (240)
-
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) - matrix (24)
-
minitest
/ unit (1) - mkmf (72)
-
net
/ http (120) -
net
/ imap (36) -
net
/ pop (12) - objspace (36)
- open-uri (36)
- open3 (108)
- openssl (72)
- optparse (72)
- ostruct (72)
- pathname (12)
- pstore (84)
- psych (14)
- rake (60)
- rbconfig (36)
-
rbconfig
/ sizeof (24) -
rdoc
/ code _ object (12) -
rdoc
/ context (36) -
rdoc
/ markdown / entities (12) -
rdoc
/ markup / to _ html _ crossref (12) -
rdoc
/ text (12) -
rdoc
/ top _ level (12) -
rexml
/ document (132) -
rexml
/ sax2listener (12) -
rexml
/ streamlistener (12) -
rinda
/ rinda (60) -
rinda
/ tuplespace (60) - rubygems (24)
-
rubygems
/ command (24) -
rubygems
/ commands / dependency _ command (12) -
rubygems
/ dependency _ installer (12) -
rubygems
/ dependency _ list (12) -
rubygems
/ remote _ fetcher (12) -
rubygems
/ requirement (12) -
rubygems
/ security (36) -
rubygems
/ source _ index (36) -
rubygems
/ source _ info _ cache (72) -
rubygems
/ spec _ fetcher (24) -
rubygems
/ specification (24) - sdbm (48)
- set (5)
- shell (6)
-
shell
/ command-processor (12) -
shell
/ filter (6) - sync (12)
-
syslog
/ logger (12) - tsort (105)
- uri (180)
-
webrick
/ accesslog (12) -
webrick
/ cgi (12) -
webrick
/ config (36) -
webrick
/ httpauth / htdigest (12) -
webrick
/ httpauth / htpasswd (12) -
webrick
/ httprequest (48) -
webrick
/ httpresponse (24) -
webrick
/ https (12) -
webrick
/ httpservlet / filehandler (12) -
webrick
/ httputils (48) -
webrick
/ server (12) -
webrick
/ ssl (24) - win32ole (12)
-
yaml
/ dbm (36) -
yaml
/ store (33)
クラス
- Array (113)
- BigDecimal (36)
- Bignum (3)
- CGI (48)
-
CGI
:: Cookie (12) -
CGI
:: Session :: FileStore (12) -
CGI
:: Session :: MemoryStore (12) -
CGI
:: Session :: NullStore (12) -
CGI
:: Session :: PStore (12) - CSV (216)
-
CSV
:: Row (27) -
CSV
:: Table (24) - Complex (24)
- Coverage (24)
- DBM (48)
-
DRb
:: DRbServer (24) -
DRb
:: ExtServManager (24) - Data (9)
- Date (134)
- DateTime (38)
- ERB (16)
-
Encoding
:: Converter (48) -
Enumerator
:: ArithmeticSequence (7) - Exception (24)
- Float (12)
- GDBM (48)
-
Gem
:: Command (24) -
Gem
:: Commands :: DependencyCommand (12) -
Gem
:: DependencyInstaller (12) -
Gem
:: DependencyList (12) -
Gem
:: RemoteFetcher (12) -
Gem
:: Requirement (12) -
Gem
:: SourceIndex (36) -
Gem
:: SourceInfoCache (72) -
Gem
:: SpecFetcher (24) -
Gem
:: Specification (24) - Hash (709)
- IO (168)
- IPAddr (12)
-
JSON
:: Parser (12) -
JSON
:: State (12) - KeyError (16)
- MatchData (26)
- Matrix (12)
- Method (12)
-
MiniTest
:: Unit (1) - Module (12)
-
Net
:: HTTP (12) -
Net
:: HTTPRequest (12) -
Net
:: HTTPResponse (24) -
Net
:: IMAP (36) -
Net
:: POP3 (12) - Numeric (12)
- Object (36)
-
OpenSSL
:: SSL :: SSLContext (12) -
OpenSSL
:: X509 :: ExtensionFactory (36) -
OpenSSL
:: X509 :: Name (12) - OpenStruct (96)
- OptionParser (48)
- PStore (72)
- Pathname (12)
- Proc (18)
-
RDoc
:: CodeObject (12) -
RDoc
:: Context (36) -
RDoc
:: Markdown (12) -
RDoc
:: Markup :: ToHtmlCrossref (12) -
RDoc
:: Options (12) -
RDoc
:: TopLevel (12) -
REXML
:: Attributes (12) -
REXML
:: DocType (24) -
REXML
:: Document (12) -
REXML
:: Element (60) -
REXML
:: XPath (24) -
Rake
:: TaskArguments (60) - Range (36)
- Rational (36)
- Regexp (48)
-
Rinda
:: TupleEntry (12) -
Rinda
:: TupleSpace (48) -
Rinda
:: TupleSpaceProxy (48) -
RubyVM
:: InstructionSequence (72) - SDBM (48)
- Set (8)
- Shell (6)
-
Shell
:: CommandProcessor (12) -
Shell
:: Filter (6) - String (240)
- Struct (75)
- Symbol (24)
-
Syslog
:: Logger (12) - Thread (12)
- Time (38)
-
URI
:: FTP (24) -
URI
:: Generic (48) -
URI
:: HTTP (24) -
URI
:: LDAP (24) -
URI
:: MailTo (24) - UnboundMethod (24)
- Vector (12)
-
WEBrick
:: CGI (12) -
WEBrick
:: GenericServer (12) -
WEBrick
:: HTTPAuth :: Htdigest (12) -
WEBrick
:: HTTPAuth :: Htpasswd (12) -
WEBrick
:: HTTPRequest (48) -
WEBrick
:: HTTPResponse (24) -
WEBrick
:: HTTPServlet :: FileHandler (12) - WIN32OLE (12)
-
YAML
:: DBM (36) -
YAML
:: Store (21)
モジュール
- Abbrev (12)
-
CGI
:: QueryExtension (48) - DRb (12)
- Enumerable (81)
- Etc (12)
- Forwardable (24)
- GC (42)
-
GC
:: Profiler (12) -
Gem
:: QuickLoader (24) -
Gem
:: Security (36) - IRB (12)
- JSON (48)
-
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 (36) -
JSON
:: Generator :: GeneratorMethods :: String :: Extend (12) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) - Kernel (252)
- Marshal (24)
-
Net
:: HTTPHeader (72) - ObjectSpace (48)
- Open3 (108)
- OpenURI (24)
-
OpenURI
:: Meta (12) -
OptionParser
:: Arguable (12) - Psych (14)
-
RDoc
:: Text (12) -
REXML
:: SAX2Listener (12) -
REXML
:: StreamListener (12) - RbConfig (60)
- SingleForwardable (24)
-
Sync
_ m (12) - TSort (93)
- URI (24)
-
WEBrick
:: AccessLog (12) -
WEBrick
:: Config (72) -
WEBrick
:: HTTPUtils (36)
オブジェクト
- ENV (193)
キーワード
- % (12)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - < (10)
- << (12)
- <= (10)
- == (12)
- === (12)
- > (10)
- >= (10)
- BasicAuth (12)
-
CODE
_ CLASS _ TO _ OBJ (12) -
CODE
_ TO _ OBJ (12) - CONFIG (24)
- Converters (12)
-
DEFAULT
_ ENTITIES (12) -
DEFAULT
_ OPTIONS (12) - DefaultMimeTypes (12)
- DigestAuth (12)
- Enumerable (12)
- ExtensionFactory (12)
- FileHandler (12)
- FormData (12)
- GW (12)
- GemPaths (12)
- GemVersions (12)
- General (12)
- Generic (12)
-
HTML
_ ENTITIES (12) - HTTP (12)
- HandlerTable (12)
- HeaderConverters (12)
- INSPECTORS (12)
- InvalidHashTupleKey (12)
- KeyError (12)
-
LEVEL
_ MAP (12) - LIMITS (12)
- Lazy (12)
-
MAKEFILE
_ CONFIG (12) -
MARSHAL
_ FIELDS (12) - Marshal フォーマット (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 4 . 0 (9) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) - Numeric (12)
- OPS (12)
- OPT (12)
- OptionParser (12)
-
PATH
_ SEPARATOR (12) - PStore (12)
- Policies (12)
- RHASH (12)
- Ruby用語集 (12)
-
SCRIPT
_ LINES _ _ (12) - SIZEOF (12)
-
SPECIFICATION
_ VERSION _ HISTORY (12) - SSL (12)
- Store (12)
-
TABLE
_ FOR _ ESCAPE _ HTML _ _ (12) - TSort (12)
- [] (25)
- []= (12)
-
_ 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) -
alias
_ map (6) - assoc (24)
- attributes (12)
- build (120)
- build2 (24)
-
build
_ self _ signed _ cert (12) -
cache
_ data (24) - cgi (12)
- clear (12)
- collect (28)
- command (12)
- command= (12)
-
compare
_ by _ identity (12) -
compare
_ by _ identity? (12) - compile (12)
-
compile
_ file (12) -
compile
_ option (12) -
compile
_ option= (12) - conf (12)
- config (48)
- 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
_ proc (12) -
default
_ proc= (12) - delegate (24)
- delete (12)
-
delete
_ if (12) - difference (7)
- dig (30)
- dump (24)
- each (84)
-
each
_ key (12) -
each
_ pair (24) -
each
_ strongly _ connected _ component (23) -
each
_ strongly _ connected _ component _ from (23) -
each
_ value (12) - encode (36)
-
encode
_ www _ form (12) - entities (12)
- eql? (60)
- equal? (12)
- exec (48)
- fetch (60)
-
fetch
_ path (12) - files (12)
- filter (64)
- filter! (28)
-
find
_ gems (12) - flatten (12)
- foreach (24)
-
form
_ data= (12) - format (12)
-
from
_ state (12) - generate (24)
-
generate
_ line (12) - getopts (60)
-
group
_ by (24) - gsub (48)
- gsub! (48)
-
handle
_ interrupt (12) - hash (253)
-
hash
_ old (12) - header (36)
- inspect (36)
-
instance
_ delegate (12) - intersection (6)
- invert (60)
- invoke (12)
-
irb
/ completion (12) -
json
_ create (156) -
keep
_ if (38) - key (8)
-
latest
_ cache _ data (12) -
latest
_ gc _ info (12) -
latest
_ specs (12) - length (12)
-
load
_ mime _ types (12) - map (28)
-
mark
_ hashentry (12) - match (12)
- member? (12)
- merge (24)
- merge! (24)
- modifiable (12)
-
named
_ captures (24) - namespaces (12)
- new (144)
- open (24)
-
open
_ uri (24) - optparse (12)
- owner (12)
- params (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) -
pretty
_ generate (12) -
pretty
_ unparse (12) -
primitive
_ convert (48) -
process
_ args (1) - query (12)
- rassoc (24)
-
raw
_ data (12) -
rb
_ f _ hash (12) -
rb
_ mark _ hash (12) - rdoc (12)
- read (36)
-
read
_ all (24) -
read
_ cache _ data (12) - readlines (12)
- receiver (8)
- rehash (54)
- reject (96)
- reject! (24)
- replace (72)
- reset (8)
-
reset
_ cache _ for (12) - restore (48)
- result (20)
-
result
_ with _ hash (8) -
rexml
/ parsers / pullparser (12) -
rexml
/ parsers / ultralightparser (12) -
rm
_ f (12) -
rm
_ rf (12) - root? (12)
- roots (12)
- rss (12)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) -
ruby2
_ keywords (18) -
ruby2
_ keywords _ hash? (6) -
safe
_ load (14) - select (50)
- select! (38)
-
set
_ cache _ data (12) -
set
_ form _ data (12) -
set
_ params (12) -
setup
_ params (12) -
show
_ hash (12) -
single
_ delegate (12) - size (12)
- spawn (48)
-
spec
_ predecessors (12) -
specific
_ extra _ args _ hash (12) - specs (12)
- sprintf (12)
- sprintf フォーマット (12)
-
ssl
_ params (12) -
st
_ foreach (12) -
st
_ init _ table (12) -
st
_ init _ table _ with _ size (12) -
start
_ element (12) -
start
_ service (12) - starttls (24)
- stat (24)
- store (12)
- strhash (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 (10)
-
to
_ a (24) -
to
_ csv (12) -
to
_ h (74) -
to
_ hash (24) -
to
_ json (252) -
to
_ json _ raw (12) -
to
_ json _ raw _ object (12) -
to
_ proc (10) -
to
_ s (48) -
transform
_ keys (20) -
transform
_ keys! (20) -
transform
_ values (18) -
transform
_ values! (18) -
try
_ convert (12) -
try
_ do (24) - tsort (24)
-
tsort
_ each (23) -
type
_ params (12) - uname (12)
- union (7)
-
unmatched
_ alias _ lists (12) -
unmatched
_ alias _ lists= (12) - unparse (12)
- update (48)
- value (12)
-
verify
_ compaction _ references (6) -
webrick
/ cgi (12) -
with
_ defaults (12) - write (24)
- xmlrpc (3)
- xsystem (12)
- yaml (12)
- | (12)
- パターンマッチ (12)
- メソッド呼び出し(super・ブロック付き・yield) (12)
- リテラル (12)
検索結果
先頭5件
-
Hash
. ruby2 _ keywords _ hash?(hash) -> bool (33314.0) -
Module#ruby2_keywordsやProc#ruby2_keywordsによる ruby2_keywords フラグが設定されているかどうかを返します。
...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
# rehash -> self (33212.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... -
static void rehash(register st
_ table *table) (32300.0) -
テーブルの全要素に対しハッシュ値を計算しなおして テーブルを再構成する。エントリに対して要素の数が 増えすぎ、テーブルが狭くなってきたときに発生する。
テーブルの全要素に対しハッシュ値を計算しなおして
テーブルを再構成する。エントリに対して要素の数が
増えすぎ、テーブルが狭くなってきたときに発生する。 -
static VALUE rb
_ f _ hash(VALUE obj , VALUE arg) (32216.0) -
Kernel.#Hash の実体です。
...Kernel.#Hash の実体です。... -
void rb
_ mark _ hash(st _ table *tbl) (32200.0) -
-
Hash
# transform _ keys(hash) -> Hash (27327.0) -
すべてのキーに対してブロックを呼び出した結果で置き換えたハッシュを返します。 値は変化しません。
...。
@param hash 置き換え前のキーから置き換え後のキーへのハッシュを指定します。
//emlist[例][ruby]{
h = { a: 1, b: 2, c: 3 }
h.transform_keys {|k| k.to_s } # => {"a"=>1, "b"=>2, "c"=>3}
h.transform_keys(a: "a", d: "d") # => {"a"=>1, :b=>2, :c=>3}
h.transform_keys(&......:to_s) # => {"a"=>1, "b"=>2, "c"=>3}
h.transform_keys.with_index {|k, i| "#{k}.#{i}" }
# => {"a.0"=>1, "b.1"=>2, "c.2"=>3}
//}
@see Hash#transform_keys!
@see Hash#transform_values
@see Hash#transform_values!... -
Hash
# merge(*others) -> Hash (27232.0) -
selfとothersのハッシュの内容を順番にマージ(統合)した結果を返します。 デフォルト値はselfの設定のままです。
...selfとothersのハッシュの内容を順番にマージ(統合)した結果を返します。
デフォルト値はselfの設定のままです。
self と others に同じキーがあった場合はブロック付きか否かで
判定方法が違います。ブロック付きのときはブ......に others の値を使います。
othersがハッシュではない場合、othersのメソッドto_hashを使って暗黙の変換を試みます。
@param others マージ用のハッシュまたはメソッド to_hash でハッシュに変換できるオブジェクトです。
@return マー......す
//emlist[][ruby]{
h1 = { "a" => 100, "b" => 200 }
h2 = { "b" => 246, "c" => 300 }
h3 = { "b" => 357, "d" => 400 }
h1.merge #=> {"a"=>100, "b"=>200}
h1.merge(h2) #=> {"a"=>100, "b"=>246, "c"=>300}
h1.merge(h2, h3) #=> {"a"=>100, "b"=>357, "c"=>300, "d"=>400}
h1.merge(h2) {|key, ol... -
Hash
# merge(*others) {|key , self _ val , other _ val| . . . } -> Hash (27232.0) -
selfとothersのハッシュの内容を順番にマージ(統合)した結果を返します。 デフォルト値はselfの設定のままです。
...selfとothersのハッシュの内容を順番にマージ(統合)した結果を返します。
デフォルト値はselfの設定のままです。
self と others に同じキーがあった場合はブロック付きか否かで
判定方法が違います。ブロック付きのときはブ......に others の値を使います。
othersがハッシュではない場合、othersのメソッドto_hashを使って暗黙の変換を試みます。
@param others マージ用のハッシュまたはメソッド to_hash でハッシュに変換できるオブジェクトです。
@return マー......す
//emlist[][ruby]{
h1 = { "a" => 100, "b" => 200 }
h2 = { "b" => 246, "c" => 300 }
h3 = { "b" => 357, "d" => 400 }
h1.merge #=> {"a"=>100, "b"=>200}
h1.merge(h2) #=> {"a"=>100, "b"=>246, "c"=>300}
h1.merge(h2, h3) #=> {"a"=>100, "b"=>357, "c"=>300, "d"=>400}
h1.merge(h2) {|key, ol... -
Hash
# merge(other) -> Hash (27232.0) -
selfとotherのハッシュの内容をマージ(統合)した結果を返します。デフォルト値はselfの設定のままです。
...selfとotherのハッシュの内容をマージ(統合)した結果を返します。デフォルト値はselfの設定のままです。
self と other に同じキーがあった場合はブロック付きか否かで
判定方法が違います。ブロック付きのときはブロックを......に other の値を使います。
otherがハッシュではない場合、otherのメソッドto_hashを使って暗黙の変換を試みます。
@param other マージ用のハッシュまたはメソッド to_hash でハッシュに変換できるオブジェクトです。
@return マージ......した結果を返します
//emlist[][ruby]{
h1 = { "a" => 100, "b" => 200 }
h2 = { "b" => 254, "c" => 300 }
h1.merge() # => {"a"=>100, "b"=>200}
h1.merge(h2) # => {"a"=>100, "b"=>254, "c"=>300}
h1.merge(h2){|key, oldval, newval| newval - oldval}
# => {"a"=>100, "b"=>54, "c"=... -
Hash
# merge(other) {|key , self _ val , other _ val| . . . } -> Hash (27232.0) -
selfとotherのハッシュの内容をマージ(統合)した結果を返します。デフォルト値はselfの設定のままです。
...selfとotherのハッシュの内容をマージ(統合)した結果を返します。デフォルト値はselfの設定のままです。
self と other に同じキーがあった場合はブロック付きか否かで
判定方法が違います。ブロック付きのときはブロックを......に other の値を使います。
otherがハッシュではない場合、otherのメソッドto_hashを使って暗黙の変換を試みます。
@param other マージ用のハッシュまたはメソッド to_hash でハッシュに変換できるオブジェクトです。
@return マージ......した結果を返します
//emlist[][ruby]{
h1 = { "a" => 100, "b" => 200 }
h2 = { "b" => 254, "c" => 300 }
h1.merge() # => {"a"=>100, "b"=>200}
h1.merge(h2) # => {"a"=>100, "b"=>254, "c"=>300}
h1.merge(h2){|key, oldval, newval| newval - oldval}
# => {"a"=>100, "b"=>54, "c"=... -
Hash
# default _ proc -> Proc | nil (27230.0) -
ハッシュのデフォルト値を返す Proc オブジェクトを返します。 ハッシュがブロック形式のデフォルト値を持たない場合 nil を返します。
...Proc オブジェクトを返します。
ハッシュがブロック形式のデフォルト値を持たない場合 nil を返します。
//emlist[例][ruby]{
h = Hash.new {|hash, key| "The #{key} not exist in #{hash.inspect}"}
p h.default #=> nil
p block = h.default_proc #=> #<Pro......c:0x0x401a9ff4>
p block.call({},:foo) #=> "The foo not exist in {}"
h = Hash.new("default")
p h.default #=> "default"
p h.default_proc #=> nil
//}
@see Hash#default... -
Hash
. try _ convert(obj) -> Hash | nil (27229.0) -
to_hash メソッドを用いて obj をハッシュに変換しようとします。
...to_hash メソッドを用いて obj をハッシュに変換しようとします。
何らかの理由で変換できないときには nil を返します。
このメソッドは引数がハッシュであるかどうかを調べるために使えます。
//emlist[][ruby]{
Hash.try_convert({......1=>2}) # => {1=>2}
Hash.try_convert("1=>2") # => nil
//}...