Ruby 1.8.7-p248 released

Hello everyone.

We now have a series of patches to fix various bugs against 1.8.7 so I
decided
to release them. Here they are.

And excuse me for absence of a detailed release note… Please read the
ChangeLog instead.

Checksums:

MD5(ruby-1.8.7-p248.tar.gz)= 60a65374689ac8b90be54ca9c61c48e3
SHA256(ruby-1.8.7-p248.tar.gz)= 

5c9cd617a2ec6b40abd7c7bdfce3256888134482b22f933a061ae18fb4b48755
SIZE(ruby-1.8.7-p248.tar.gz)= 4831010

MD5(ruby-1.8.7-p248.tar.bz2)= 37e19d46b7d4b845f57d3389084b94a6
SHA256(ruby-1.8.7-p248.tar.bz2)= 

3d238c4cf0988797d33169ab05829f1a483194e7cacae4232f3a0e2cc01b6bfc
SIZE(ruby-1.8.7-p248.tar.bz2)= 4153123

MD5(ruby-1.8.7-p248.zip)= 819b9db9bcd4aa9a70f1193380a318c9
SHA256(ruby-1.8.7-p248.zip)= 

c133ecf35d5509e61443db05c9691bea6c6f63b87600a452b742014767bd98b3
SIZE(ruby-1.8.7-p248.zip)= 5889980

Happy holidays!

On 12/25/2009 2:19 AM, Urabe S. wrote:

Does not build in cygwin 1.7. (This is the first time I’ve tried to
build any 1.8.7 in any cygwin, so I can’t say if the problem is new.)
The most recent releases of 1.8.6 and 1.9.1 build ok in cygwin 1.7.

Here is the error with ruby-1.8.7-p248 under cygwin 1.7 (on windows 7
x86-64):

$ gcc -g -O2 -DRUBY_EXPORT -I. -I. -c eval.c
eval.c:211: error: conflicting types for ‘_longjmp’
/usr/include/machine/setjmp.h:335: error: previous declaration of
‘_longjmp’ was here
eval.c:211: error: conflicting types for ‘_longjmp’
/usr/include/machine/setjmp.h:335: error: previous declaration of
‘_longjmp’ was here

$ gcc -v
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
Configured with:
/managed/gcc-build/final-v3-bootstrap/gcc-3.4.4-999/configure --verbose
–program-suffix=-3 --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc
–libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
–infodir=/usr/share/info
–enable-languages=c,ada,c++,d,f77,pascal,java,objc --enable-nls
–without-included-gettext --enable-version-specific-runtime-libs
–without-x --enable-libgcj --disable-java-awt --with-system-zlib
–enable-interpreter --disable-libgcj-debug --enable-threads=posix
–enable-java-gc=boehm --disable-win32-registry --enable-sjlj-exceptions
–enable-hash-synchronization --enable-libstdcxx-debug
Thread model: posix
gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)

Seems like it might be related to:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/23340
http://redmine.ruby-lang.org/issues/show/1388

Thanks, and happy holidays to you too!

Hi,

Thanks for the update. This is kind of a sniggly little bug, but can
really smack you in the face if you are doing any XML parsing and
working with outside vendors, like with REST web services.

The REXML library has a bug parsing the xml declaration standalone
attribute. It requires a space between the ‘=’ and the value of the
attribute.

<?xml version="1.0 standalone= "no" ?> <?xml version="1.0 standalone="no" ?>

The latter is valid XML as well as the former, but does not parse
correctly in REXML.

It is documented in Trac Ticket #152 for the REXML Trac Wiki. This
has been open for more than 20 months. I saw it on another ticket, but
at the moment I can’t find that one.

I submitted a patch and a comment with some RSpec tests to demonstrate
the issue. It exists in
ruby-1.8.7-p174, ruby-1.8.7-p248, ruby-1.9.1-p376 : ruby 1.9.1p376
and ruby 1.9.1p243.

In my case, i was dealing with the U.S. government and the
requirements were strict XML. It is any easy bug to work around/patch,
once you find it, but annoying, nonetheless.

Any chance, this small fix can get incorporated into another round of
bug fixes? 20 months is a long time to leave a defect like this open
w/o even assigning it.

Thanks,
Ed

Happy Holidays to you too!

On Sun, Dec 27, 2009 at 07:13:57AM +0900, Ed Howland wrote:

<?xml version="1.0 standalone= "no" ?> <?xml version="1.0 standalone="no" ?>

The latter is valid XML as well as the former, but does not parse
correctly in REXML.

It is documented in Trac Ticket #152 for the REXML Trac Wiki. This
has been open for more than 20 months. I saw it on another ticket, but
at the moment I can’t find that one.

Can you send a link? I didn’t see this ticket in redmine. I’ll take a
look if there is a link. Thanks!

Also,

I hate to be nit picky about this, but can the
REXML::docu,emt$stand_alone? predicate return true for “yes” and false
for “no”. At the moment it returns the string value of the xml
declaation attribute. If the intent is to report the value as a string
as the documentation suggests, then the method should just be named
‘standalone’ or ‘stand_alone’ if you wish. More like version and
encoding. Appending the ‘?’ makes it look like a predicate. This fails
to work in unit testing and cases like RSpec.

doc = REXML::Document.new(‘<?xml version="1.0" standalone= "no" ?>’)
doc.should_not be_stand_alone

produces
1)
‘REXML::Document should not be stand_alone’ FAILED
expected stand_alone? to return false, got “no”

Note, a DSL custom matcher is easily written. (I have changed the
predicate to standalone? to avoid confusion, and because IMO, it shoud
be named like the attribute it self, and who wants to look at the
documentation to have to figure out why it isn’t just named like the
other attributes.)

pec::Matchers.define :be_standalone do |expected|
match do |actual|
actual.stand_alone? == ‘yes’
end
failure_message_for_should do |actual|
“expected that #{actual}.stand_alone? should == ‘yes’”
end
failure_message_for_should_not do |actual|
“expected that #{actual}.stand_alone? should == ‘no’”
end
description do
“be a standalone document”
end
end

Merry Christmas!
Ed

[1] XML Spec:standalone Extensible Markup Language (XML) 1.0 (Fifth Edition)

On Mon, Dec 28, 2009 at 04:24:55AM +0900, Ed Howland wrote:

Sorry Aaron, here is the link:
http://trac.germane-software.com/rexml/ticket/152

I am new to this, so if it would work faster to use Redmine to report
this, then I am willing to do so. REXML seemed to be being tracked on
the Trac wiki at germane-software.com. Searching for REXML on Redmine
[1] yields 0 results, so that led me to believe issue tracking for
that standard library was at the above URL.

I think using redmine will result in faster response. Currently, rexml
is considered unmaintained by ruby core. Since no one is an official
maintainer, bugs filed on redmine will likely get fixed. However,
feature requests like changing the stand_alone? method may not.

Also, this issue affects both release branches: 1.9 and 1.8. If I do
post an issue in Redmine, should I post it multiple times for each
branch?

No. Just file the ticket for 1.9. I’m happy to commit bug fix patches
that come with tests. I only have permission to commit to trunk though,
so you’ll have to lobby the release managers to get it backported.

Hope that helps!

Also, have you considered using something like nokogiri?

Sorry Aaron, here is the link:
http://trac.germane-software.com/rexml/ticket/152

I am new to this, so if it would work faster to use Redmine to report
this, then I am willing to do so. REXML seemed to be being tracked on
the Trac wiki at germane-software.com. Searching for REXML on Redmine
[1] yields 0 results, so that led me to believe issue tracking for
that standard library was at the above URL.

Also, this issue affects both release branches: 1.9 and 1.8. If I do
post an issue in Redmine, should I post it multiple times for each
branch?

Please inform.
Thanks
Ed

[1] REXML search on Redmine: http://redmine.ruby-lang.org/search?q=rexml

On Sun, Dec 27, 2009 at 1:59 PM, Aaron P.

On Mon, Dec 28, 2009 at 09:51:57AM +0900, Ed Howland wrote:

REXML. It is probably the first XML lib new users to Ruby encounter

No. Just file the ticket for 1.9. I’m happy to commit bug fix patches
that come with tests. I only have permission to commit to trunk though,
so you’ll have to lobby the release managers to get it backported.

I’ll be glad to submit it to 1.9. Will RSpec tests do or should I
convert them to Test::Unit? (This being my first time on Ruby
Redmine), Should the test demonstrate the bug, then after the patch
runs with only success?

The tests in Ruby use minitest, so converting to Test::Unit is most
helpful. But if you just submit code that reproduces the bug along with
your patch that fixes the bug, I’ll make sure a test gets added. :slight_smile:

Thanks for the response Aaron.

On Sun, Dec 27, 2009 at 5:57 PM, Aaron P. >

I think using redmine will result in faster response. Currently, rexml
is considered unmaintained by ruby core. Since no one is an official
maintainer, bugs filed on redmine will likely get fixed. However,
feature requests like changing the stand_alone? method may not.

I understand. It is too bad that the maintenance has atrophied for
REXML. It is probably the first XML lib new users to Ruby encounter
(in the Pickaxe book, for example). Pity it can’t be updated.

My patch fixes a definate (albeit minor) bug. I’m happy to let the
name of the stand_alone? method stand for backward compatiblity
reasons. As I mentioned or meant to mention, I grabbed the fix from
another ticket at the Trac Wiki for REXML, but I can’t find that
ticket now, so I used #152 which was the same issue. The patch is one
line of code (one character actually).

No. Just file the ticket for 1.9. I’m happy to commit bug fix patches
that come with tests. I only have permission to commit to trunk though,
so you’ll have to lobby the release managers to get it backported.

I’ll be glad to submit it to 1.9. Will RSpec tests do or should I
convert them to Test::Unit? (This being my first time on Ruby
Redmine), Should the test demonstrate the bug, then after the patch
runs with only success?

Thanks,

Hope that helps!
It certainly does.

Also, have you considered using something like nokogiri?

Nokogiri is the dude! I think the XML parsing is pretty smooth,
although I haven’t had much of a chance to play with it much. This
problem qas based on an issue that came up when I wrote a custom
matcher for RSpec that matches XML strings. It defines a function
called ‘be_functionally_eql’ as in:

my_xml.should be_functionally_eql(expected_xml)

… where the two XML’s can have varying degrees of ‘whiteness’. It
then uses RSpec’s difference output to highlight the exact node(s)
that are different. Of course, it immediately failed on the first
line because of the bug in the standalone attribute.

Cheers and Happy New Year!
Ed

e$B$3$s$K$A$O!#e(B

e$B:rG/Jk$l$K%j%j!<%9$5$l$?e(B Ruby 1.8.7-p248 e$B$G$9$,!"$=$NA0$Ne(B
p174 e$B$KHf$Ye(B
e$B$FIT2D;W5D$J8=>]$r3NG’$7$F$$$^$9!#e(B

e$B4D6-e(B: NetBSD 5.0_STABLEe$B$*$h$Se(Bcurrent (5.99.22) / i386

make test-all
e$B$r<B9T$7$?$H$-$K!"e(Bthreade$B$N%F%9%H$G@h$K?J$^$J$/$J$j$^$9!#e(B
e$BD4$Y$F$o$+$C$?$3$H$O!"0J2<$N$h$&$K$J$j$^$9!#e(B

o
test/thread/test_thread.rbe$B$+$i<B9T$5$l$ke(Blbtest.rbe$B$rD>@<B9T$9$k$H!"e(B
e$BLdBj$J$/40N;$9$k!#e(B

o test/thread/test_thread.rbe$B$Ne(B test_local_barrier
e$B%a%=%C%IFb$G!"e(B
lbtest.rbe$B$N8F$S=P$7$r$re(B10e$B2s7+$jJV$7$F$$$k$,!"e(B

  • e$B$3$l$re(B1e$B2s$K$9$k$HLdBj$J$/40N;$9$k!#e(B

  • 2e$B2s0J>e7+$jJV$9$He(B2e$B2sL$+$i!"e(B

        result = `#{EnvUtil.rubybin} #{lbtest}`
    

    e$B$N7k2L$rBT$AB3$1$F%V%m%C%/$7$?>uBV$K$J$k!#e(B

e$B$3$N>uBV$G!"e(BControl-Ce$B$GCfCG$9$k$H!"e(Blbtest.rbe$B$r<B9T$7$F$$$ke(BRubye$B$Ne(B
e$B%W%m%;%9$,;D$C$F!"e(BSIGKILLe$B0J30$N%7%0%J%k$rL5;k$7$F$$$k$h$&$@!#e(B

e$B0J2<$NJ}K!$G3NG’$7$F$$$^$9!#e(B

% eval "make -n test-all -v thread" (threade$B$@$1<B9Te(B)
Loaded suite thread
Started
test_condvar(TC_Thread): .
test_condvar_wait_exception_handling(TC_Thread): .
test_condvar_wait_not_owner(TC_Thread): .
test_local_barrier(TC_Thread): ^C./test/thread/test_thread.rb:75:in ``’:
Interrupt
from ./test/thread/test_thread.rb:75:in test_local_barrier' from ./test/thread/test_thread.rb:74:intimes’
from ./test/thread/test_thread.rb:74:in test_local_barrier' (e$B0J2<>JN,e(B) % ps jc |egrep ruby taca 4116 1 546 d326a8 0 Il ttyp2 0:00.10 ruby18 % kill 4116 % ps jc |egrep ruby taca 4116 1 546 d326a8 0 Sl ttyp2 0:00.16 ruby18 % gcore 4116 % gdb ruby18 ruby18.core (e$B>JN,e(B) Core was generated byruby18’.
#0 0xbba31017 in ___lwp_park50 () from /usr/lib/libc.so.12
(gdb) where
#0 0xbba31017 in ___lwp_park50 () from /usr/lib/libc.so.12
#1 0xbbb0db43 in pthread_cond_timedwait () from
/usr/lib/libpthread.so.1
#2 0xbbb3d6e0 in thread_timer ()
from
/data/work/lang/ruby18-base/work.edge/ruby-1.8.7-p248/libruby18.so.18
#3 0xbbb0ff1b in pthread_create () from /usr/lib/libpthread.so.1
#4 0xbba31030 in ___lwp_park50 () from /usr/lib/libc.so.12
#5 0xbb600000 in ?? ()
#6 0x08049ad0 in ?? ()
#7 0xbb500000 in ?? ()
#8 0x00000000 in ?? ()

e$B2~$a$Fe(Blbtest.rbe$B$r8F$S=P$7$F$$$kB&!"e(Btest/thread/test_thread.rbe$B$r<B9TCfe(B
e$B$Ne(BRubye$B$N%W%m%;%9$re(Bgcore(1)e$B$r;H$C$F>uBV$r8+$k$H!"e(B

(gdb) where
#0 0xbb9ef4c7 in read () from /usr/lib/libc.so.12
#1 0xbbb0ada8 in read () from /usr/lib/libpthread.so.1
#2 0xbbab0f82 in __sread () from /usr/lib/libc.so.12
#3 0xbbaa4dbf in __srefill () from /usr/lib/libc.so.12
#4 0xbbaa4cd3 in __srget () from /usr/lib/libc.so.12
#5 0xbbaa4649 in getc () from /usr/lib/libc.so.12
#6 0xbbb60094 in io_fread ()
from
/data/work/lang/ruby18-base/work.edge/ruby-1.8.7-p248/libruby18.so.18
#7 0xbbb60246 in read_all ()
from
/data/work/lang/ruby18-base/work.edge/ruby-1.8.7-p248/libruby18.so.18
#8 0xbbb65051 in rb_f_backquote ()
from
/data/work/lang/ruby18-base/work.edge/ruby-1.8.7-p248/libruby18.so.18

e$B$H!"e(Breade$B$G%V%m%C%/$7$F$$$k$3$H$,3NG’$G$-$^$9!#e(B

e$B0J>e!">u67$ND4::$@$1$G2r7hJ}K!$OITL@$G$9!#e(B