Add documentation to Range

This commit is contained in:
Daniel Bovensiepen
2012-05-06 18:16:26 +08:00
parent b032acd6b6
commit dea4ccdd97
+13 -4
View File
@@ -1,8 +1,14 @@
##
# Range
#
# Range
#
# ISO 15.2.14
class Range
# 15.2.14.4.4
##
# Calls the given block for each element of +self+
# and pass the respective element.
#
# ISO 15.2.14.4.4
def each(&block)
val = self.first
unless val.respond_to? :succ
@@ -23,7 +29,10 @@ class Range
end
end
# include modules
##
# Range is enumerable
#
# ISO
module Enumerable; end
class Range
include Enumerable