I am trying to create a hash from an array, and the documentation for http://ruby-doc.org/ruby-1.9/classes/Array.src/M000744.html shows an internal ruby method called ary_make_hash. The source uses this for difference arrays. Corresponding line in the source: ary_make_hash (to_ary (ary2), 0);
Is there a way to access the ary_make_hash function and other Ruby internal functions from within Ruby? I ask, since I'm trying to convert an array to a hash, and I would like to use the built-in C methods, since they are much faster. (FYI. I see the difference in speed by subtracting two arrays that internally call the converter method). Thanks for any thoughts.
Robert
source
share