I’m working on one component of this as we speak. I just committed the
first Ruby interpreter source file with embedded documentation. Once
this task is finished, you’ll be able to generate RDoc documentation of
all of Ruby (and any libraries that choose to participate). You’ll also
have full ‘ri’ integration. For example, I can now say:
dave[ruby/lib 14:42:34] ri Array.zip
-------------------------------------------------------------- Array#zip
array.zip(arg, …) → an_array
array.zip(arg, …) {| arr | block } → nil
···
On Dec 16, 2003, at 13:28, Carter Thompson wrote:
Absolutely! I’m currently very fluent with Perl and I’m struggling
with Ruby. Lack of adequate documentation is making my learning
experience more time consuming and somewhat more frustrating. More
Ruby documentation would significantly improve my Ruby experience.
Converts any arguments to arrays, then merges elements of _self_
with corresponding elements from each argument. This generates a
sequence of <code>self#size</code> _n_-element arrays, where _n_ is
one more that the count of arguments. If the size of any arguemnt
is less than <code>enumObj#size</code>, <code>nil</code> values are
supplied. If a block given, it is invoked for each output array,
otherwise an array of arrays is returned.
a = [ 4, 5, 6 ]
b = [ 7, 8, 9 ]
[1,2,3].zip(a, b) #=> [[1, 4, 7], [2, 5, 8], [3, 6, 9]]
[1,2].zip(a,b) #=> [[1, 4, 7], [2, 5, 8]]
a.zip([1,2],[8]) #=> [[4,1,8], [5,2,nil], [6,nil,nil]]
dave[ruby/lib 14:42:40] ri Date.step
-------------------------------------------------------------- Date#step
step(limit, step) {|date| …}
Step the current date forward +step+ days at a time (or backward,
if +step+ is negative) until we reach +limit+ (inclusive), yielding
the resultant date at each step.
(forgive the funky markup symbols: it’s a work in progress…)
Cheers
Dave