Some fixes for the Documentation of Hash and Kernel

This commit is contained in:
Daniel Bovensiepen
2012-05-06 18:24:39 +08:00
parent dea4ccdd97
commit 580b0267a8
2 changed files with 7 additions and 9 deletions
+5 -7
View File
@@ -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
View File
@@ -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)