diff options
| -rw-r--r-- | mrblib/range.rb | 17 |
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 |
