Tanaka Akira wrote:
> In article <82FB5EC2-0775-4EAB-AE97-A7CFA89DECE9 / gmail.com>,
>   Federico Builes <federico.builes / gmail.com> writes:
>
>   
>> I'm not sure how's the situation with most of these libraries but I  
>> was responsible for the REXML specs so let me chime in. P111 had a  
>> _really_ buggy REXML revision with several typos/small bugs that were  
>> (mostly) fixed in P114 so that might be a better target for  
>> compatibility (for that library at least).
>>     
>
> Yes.  REXML has typo.
>
> This is an example of failure caused by typo.
>
> | REXML::Document#add overwrites existing DocType ERROR
> | NoMethodError: undefined method `kind_of' for #<REXML::DocType:0xb7580630>
>
>   
>> Anyway, if you consider there's a wrong spec somewhere in there please  
>> let me know.
>>     
>
> The test has ruby_bug guard.
>
> rubyspec/1.8/library/rexml/document/add_spec.rb:
> |    ruby_bug "#19058", "1.8.6.114" do
>
> The test is run for 1.8.6p238 but not for ruby 1.8.6p114.
> This causes rubyspec/1.8/17630.log has the above failure
> which is not in rubyspec/1.8/p111.log in the reported log.
>
> But this doesn't mean REXML in 1.8.6p238 has new bug or spec
> change.
>   
Thank you both for the reviews and for clarifying the situation with the 
guard conditions. I've read up on the topic at 
http://rubyspec.org/wiki/rubyspec/Guards

As I understand this, the #ruby_bug method silently acts as if the 
example passed when run on an implementation with a known bug. Shouldn't 
this provide some warning, kind of like RSpec treats "pending"?

The SVN r17630 Ruby that I tested still has this bug that Federico 
Builes reported and provided a patch for three months ago.

The spec says that the bug is only present up to p114, but if the patch 
was never officially applied, shouldn't the guard condition be updated 
or relaxed?

-igal