summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-hash-ext/mrblib/hash.rb
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2015-10-22 07:10:16 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2015-10-22 07:10:16 +0900
commit727f2485c9028cbd5eb4085e965bcaada6fb53f6 (patch)
treeb6876bcd35017746de47dc5f3949fcb72ea37c16 /mrbgems/mruby-hash-ext/mrblib/hash.rb
parente5fbf9dfa2bbbe5ecbf6cc25ff5d35e7da7f00e3 (diff)
parentd4238494eb7cd36c510c87ace6c31aeb1d0f1d6b (diff)
downloadmruby-727f2485c9028cbd5eb4085e965bcaada6fb53f6.tar.gz
mruby-727f2485c9028cbd5eb4085e965bcaada6fb53f6.zip
Merge pull request #2999 from sagmor/better-docs
More Docs
Diffstat (limited to 'mrbgems/mruby-hash-ext/mrblib/hash.rb')
-rw-r--r--mrbgems/mruby-hash-ext/mrblib/hash.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/mrbgems/mruby-hash-ext/mrblib/hash.rb b/mrbgems/mruby-hash-ext/mrblib/hash.rb
index ec8bd05fb..d243aec24 100644
--- a/mrbgems/mruby-hash-ext/mrblib/hash.rb
+++ b/mrbgems/mruby-hash-ext/mrblib/hash.rb
@@ -5,22 +5,22 @@ class Hash
##
# call-seq:
- # Hash[ key, value, ... ] -> new_hash
- # Hash[ [ [key, value], ... ] ] -> new_hash
- # Hash[ object ] -> new_hash
+ # Hash[ key, value, ... ] -> new_hash
+ # Hash[ [ [key, value], ... ] ] -> new_hash
+ # Hash[ object ] -> new_hash
#
# Creates a new hash populated with the given objects.
#
- # Similar to the literal <code>{ _key_ => _value_, ... }</code>. In the first
+ # Similar to the literal `{ _key_ => _value_, ... }`. In the first
# form, keys and values occur in pairs, so there must be an even number of
# arguments.
#
# The second and third form take a single argument which is either an array
# of key-value pairs or an object convertible to a hash.
#
- # Hash["a", 100, "b", 200] #=> {"a"=>100, "b"=>200}
- # Hash[ [ ["a", 100], ["b", 200] ] ] #=> {"a"=>100, "b"=>200}
- # Hash["a" => 100, "b" => 200] #=> {"a"=>100, "b"=>200}
+ # Hash["a", 100, "b", 200] #=> {"a"=>100, "b"=>200}
+ # Hash[ [ ["a", 100], ["b", 200] ] ] #=> {"a"=>100, "b"=>200}
+ # Hash["a" => 100, "b" => 200] #=> {"a"=>100, "b"=>200}
#
def self.[](*object)