summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDaniel Bovensiepen <[email protected]>2012-05-06 18:16:26 +0800
committerDaniel Bovensiepen <[email protected]>2012-05-06 18:16:26 +0800
commitdea4ccdd97b4ccb3a875e5b96036e03e5a25c1ae (patch)
tree9d4fbe7048675491c95ca8e41cca98503008136c
parentb032acd6b6839b3c819868248b62c14386335591 (diff)
downloadmruby-dea4ccdd97b4ccb3a875e5b96036e03e5a25c1ae.tar.gz
mruby-dea4ccdd97b4ccb3a875e5b96036e03e5a25c1ae.zip
Add documentation to Range
-rw-r--r--mrblib/range.rb17
1 files changed, 13 insertions, 4 deletions
diff --git a/mrblib/range.rb b/mrblib/range.rb
index 79bc40ecd..8f43f3cbb 100644
--- a/mrblib/range.rb
+++ b/mrblib/range.rb
@@ -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