mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Some fixes for the Documentation of Hash and Kernel
This commit is contained in:
+5
-7
@@ -61,13 +61,11 @@ class Hash
|
||||
##
|
||||
# Return a hash which contains the content of
|
||||
# +self+ and +other+. If a block is given
|
||||
# call the block for each duplicate key and
|
||||
# pass the key, old value and new value.
|
||||
# The value of the block will be replacing
|
||||
# the duplicate element in the has which will
|
||||
# be returned.
|
||||
#
|
||||
# 15.2.13.4.22
|
||||
# it will be called for each element with
|
||||
# a duplicate key. The value of the block
|
||||
# will be the final value of this element.
|
||||
#
|
||||
# ISO 15.2.13.4.22
|
||||
def merge(other, &block)
|
||||
h = {}
|
||||
raise "can't convert argument into Hash" unless other.respond_to?(:to_hash)
|
||||
|
||||
+2
-2
@@ -38,7 +38,7 @@ module Kernel
|
||||
end
|
||||
|
||||
##
|
||||
# Alias for Kernel.lambda.
|
||||
# Alias for +Kernel.lambda+.
|
||||
#
|
||||
# 15.3.1.3.27
|
||||
def lambda(&block)
|
||||
@@ -47,7 +47,7 @@ module Kernel
|
||||
end
|
||||
|
||||
##
|
||||
# Alias for Kernel.loop.
|
||||
# Alias for +Kernel.loop+.
|
||||
#
|
||||
# ISO 15.3.1.3.29
|
||||
def loop #(&block)
|
||||
|
||||
Reference in New Issue
Block a user