# Libxml-ruby is too crazy

**URL:** <https://www.ruby-forum.com/t/libxml-ruby-is-too-crazy/155159>\
**Category:** Ruby\
**Created:** [December 8, 2008, 8:37pm UTC](https://www.ruby-forum.com/t/libxml-ruby-is-too-crazy/155159 "2008-12-08T20:37:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hoshbad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e274bd/32.png) [@hoshbad](https://www.ruby-forum.com/u/hoshbad)\
**Post date:** [December 8, 2008, 8:37pm UTC](https://www.ruby-forum.com/t/libxml-ruby-is-too-crazy/155159/1 "2008-12-08T20:37:52Z")

</div>

Okay, if any libxml-ruby developers read this list, I sincerely hope you  
will read this and hear my plea. Stop the madness! I just installed the  
latest version of libxml-ruby (0.9.6) and suddenly my old scripts are  
breaking when I call the “save” method.

Worst of all, this is a Type Error that seems to be occuring in the C  
layer – Ruby blows up because apparently save is expecting a Hash?!?  
Whaaaaaaaa? The API docs say it’s expecting a boolean, last time I  
checked “true” is a boolean value.

Stop the hate, child!

---

<div class="post-metadata">

**Author:** ![hoshbad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e274bd/32.png) [@hoshbad](https://www.ruby-forum.com/u/hoshbad)\
**Post date:** [December 8, 2008, 9:11pm UTC](https://www.ruby-forum.com/t/libxml-ruby-is-too-crazy/155159/2 "2008-12-08T21:11:37Z")

</div>

Mind you, I fixed the problem by rolling back to version 0.9.4. : )

Sebastian W. wrote:

> Okay, if any libxml-ruby developers read this list, I sincerely hope you  
> will read this and hear my plea. Stop the madness! I just installed the  
> latest version of libxml-ruby (0.9.6) and suddenly my old scripts are  
> breaking when I call the “save” method.
> 
> Worst of all, this is a Type Error that seems to be occuring in the C  
> layer – Ruby blows up because apparently save is expecting a Hash?!?  
> Whaaaaaaaa? The API docs say it’s expecting a boolean, last time I  
> checked “true” is a boolean value.
> 
> Stop the hate, child!

---

<div class="post-metadata">

**Author:** ![hoshbad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e274bd/32.png) [@hoshbad](https://www.ruby-forum.com/u/hoshbad)\
**Post date:** [December 8, 2008, 9:12pm UTC](https://www.ruby-forum.com/t/libxml-ruby-is-too-crazy/155159/3 "2008-12-08T21:12:45Z")

</div>

On Dec 8, 2:31 pm, “Sebastian W.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Stop the hate, child!  
> Sorry to interrupt your ranting, but can you please provide a sample  
> of the problem?

Like, a short script that exposes the problem before and after the  
update?

You can easily use a old version of the gem simply by indicating it to  
“gem” command:

require ‘rubygems’  
gem ‘libxml’, ‘version goes here’  
require ‘…’

Don’t rant without providing information for others to agree or  
disagree with you.

At least do that, and we will make this a better world.

---

<div class="post-metadata">

**Author:** ![hoshbad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e274bd/32.png) [@hoshbad](https://www.ruby-forum.com/u/hoshbad)\
**Post date:** [December 8, 2008, 9:25pm UTC](https://www.ruby-forum.com/t/libxml-ruby-is-too-crazy/155159/4 "2008-12-08T21:25:05Z")

</div>

Mark T. [2008-12-08 21:08]:

> On Dec 8, 2:31 pm, “Sebastian W.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Okay, if any libxml-ruby developers read this list, I sincerely  
> > hope you will read this and hear my plea. Stop the madness!
> 
> 0.9.6 was released today, and the announcement on the libxml-ruby  
> mailing list requested testing because it was heavily  
> refactored, preparing for a 1.0 release. So I suggest filing a  
> bug on rubyforge.  
> not sure if that’s the issue, but there’s been a major change wrt  
> XML::Document#save in 0.9.6. from the changelog:

“This is an API change and may break existing calls to  
XML::Document#save.”

[http://libxml.rubyforge.org/svn/trunk/CHANGES](http://libxml.rubyforge.org/svn/trunk/CHANGES)

also, there is a mailing list dedicated to this project:

[http://rubyforge.org/mail/?group\_id=494](http://rubyforge.org/mail/?group_id=494)

cheers  
jens

---

<div class="post-metadata">

**Author:** ![hoshbad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e274bd/32.png) [@hoshbad](https://www.ruby-forum.com/u/hoshbad)\
**Post date:** [December 8, 2008, 9:15pm UTC](https://www.ruby-forum.com/t/libxml-ruby-is-too-crazy/155159/5 "2008-12-08T21:15:41Z")

</div>

On Dec 8, 2:31 pm, “Sebastian W.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Okay, if any libxml-ruby developers read this list, I sincerely hope you  
> will read this and hear my plea. Stop the madness!

0.9.6 was released today, and the announcement on the libxml-ruby  
mailing list requested testing because it was heavily refactored,  
preparing for a 1.0 release. So I suggest filing a bug on rubyforge.

– Mark.

---

<div class="post-metadata">

**Author:** ![hoshbad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e274bd/32.png) [@hoshbad](https://www.ruby-forum.com/u/hoshbad)\
**Post date:** [December 9, 2008, 4:30pm UTC](https://www.ruby-forum.com/t/libxml-ruby-is-too-crazy/155159/6 "2008-12-09T16:30:34Z")

</div>

Mark T. wrote:

> 0.9.6 was released today

Does it work with ruby-1.9.1?

I get a cascade of errors, starting with

#warning use “ruby/io.h” instead of “rubyio.h”

so it doesn’t look like a reportable bug so much as a known feature…

---

<div class="post-metadata">

**Author:** ![hoshbad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e274bd/32.png) [@hoshbad](https://www.ruby-forum.com/u/hoshbad)\
**Post date:** [December 13, 2008, 8:41am UTC](https://www.ruby-forum.com/t/libxml-ruby-is-too-crazy/155159/7 "2008-12-13T08:41:34Z")

</div>

Okay, I will admit that I was trolling a bit when I wrote that original  
post. I apologize – it was the end of a frustrating day. Sorry for  
injecting negativity on the forums.

That having been said, my source of frustration was that yes, okay -  
there is a new version of the gem out. I ran my scripts, things broke  
and I started looking through my code to find the problem. The error  
message I got when calling “save” was that I was passing a boolean where  
a hash was expected.

So, sure enough, I dig through my trusty RDocs to find the documentation  
for the newest version of the gem. Here is where things went wrong for  
me and I posted in the forums – the API doc for save, at least when I  
looked, had not been updated to reflect the new signature for the “save”  
method. So…at least in my view of programming, if you do something as  
significant as changing the signature of a method as VITAL as “save”,  
you had better update that in the API doc.

It’s good that there’s a libxml-ruby forum - and I did check it for  
threads but nothing jumped out - but I don’t find it reasonable to  
expect folks to have to go to the forum for updates on such a  
significant refactoring. If you change something as important as “save”,  
that MUST be updated in the RDoc. No ifs, ands, or buts about it.

Should I go dig through the source code if I think the RDoc is wrong?  
Well…on the one hand, I’m sort of forced to do that, but I don’t think  
that should be required. Just because we’re using open source software  
doesn’t mean that people should get sloppy. If you bothered to write the  
doc once, you’ve created an expectation that it’s going to stay updated.

Did this turn into another rant? I suppose, but I just wanted to get it  
out there.

Again – I just want to emphasize that libxml-ruby has been a great tool  
in my toolbelt for the past few months. It’s blazingly fast, gets stuff  
done fast, and I’ve generally found it to be pretty easy to work with  
(as easy as XML lends itself to be, but we’ll let that go by). So…I  
guess the frustration also came from me being used to the library being  
so great. When something that has been tried and true suddenly blows up,  
I get a little miffed. Whether or not that’s justified is something we  
can debate, I guess. : )
