I am working with libxml-ruby, the Ruby wrapper for the C libxml. I don't understand one section (rxml_reader_io). The line below ('result' is the Ruby VALUE for the object):
rb_ivar_set(result, IO_ATTR, io);
where:
IO_ATTR = ID2SYM(rb_intern("@io"));
The comments lead me believe that the first line is setting an instance variable, but the second line is defining a symbol, :io or maybe :@io.
It seems to me that the first line should be:
rb_ivar_set(result, rb_intern("@io"), io);
or equivalent.
The other question is there anyway to access the value set in the first statement from Ruby? Or do I have to correct the library source and rebuild?
TIA, Jeffrey