Ian Macdonald wrote: > Hello, > > I recently took over the maintenance of the Ruby/LDAP library and am > stuck on interpreting the following line: > > tmp = rb_assoc_new (op, rb_ary_new ()); > > I can't find an explanation of rb_assoc_new() anywhere. It's used all > over the Ruby source code and yet I still can't figure what's going on. > > I know that rb_ary_new() makes a new array, which is presumably being > associated with tmp, but what does op have to do with it? > (...) > Is this just a convenient way to instantiate a two element array? > This seems to be the most common use. Perhaps in the future it may have a different meaning (if there was some kind of Assoc Class..?? like described here: http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/46128 ). -Charlie