From dea4ccdd97b4ccb3a875e5b96036e03e5a25c1ae Mon Sep 17 00:00:00 2001 From: Daniel Bovensiepen Date: Sun, 6 May 2012 18:16:26 +0800 Subject: Add documentation to Range --- mrblib/range.rb | 17 +++++++++++++---- 1 file 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 -- cgit v1.2.3