diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-05-06 06:29:39 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-05-06 06:29:39 -0700 |
| commit | 4edfe3bc379ffd42ea56108582316a98bf142101 (patch) | |
| tree | fe022811a83ef98bfecfbf4250e42a7cae034329 /mrblib/range.rb | |
| parent | 4f9a7e90adf0bdd77e7971d5066834c68eac33b0 (diff) | |
| parent | 1906d6eb33ea7e9643a7f506b83c13bcccf133dd (diff) | |
| download | mruby-4edfe3bc379ffd42ea56108582316a98bf142101.tar.gz mruby-4edfe3bc379ffd42ea56108582316a98bf142101.zip | |
Merge pull request #101 from bovi/master
Add documentation for Hash, Kernel, Numeric, Array and Range
Diffstat (limited to 'mrblib/range.rb')
| -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..44be0305b 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 15.2.14.3 module Enumerable; end class Range include Enumerable |
