I am trying to extend the Hash class so that I can “Insert the content
of a Hash object to another Hash object”.
However, the internal code for Hash is written in c. Is it possible to
extend the class using ruby itself? How, since we don’t know the
internal data structures of class Hash.
I am trying to extend the Hash class so that I can “Insert the content
of a Hash object to another Hash object”.
However, the internal code for Hash is written in c. Is it possible to
extend the class using ruby itself? How, since we don’t know the
internal data structures of class Hash.
It is possible, just like other Ruby-defined classes. But first you
can check out “update” method for Hash class.
I am trying to extend the Hash class so that I can “Insert the content
of a Hash object to another Hash object”.
However, the internal code for Hash is written in c. Is it possible to
extend the class using ruby itself? How, since we don’t know the
internal data structures of class Hash.
It is possible, just like other Ruby-defined classes. But first you
can check out “update” method for Hash class.