rbtree tests fail on 1.8.2, but not on 1.8.4

Discussion in 'Ruby' started by Toby DiPasquale, Mar 8, 2006.

  1. Hi all,

    I dug up the rbtree 0.1.3 tarball from the RAA cache and am trying to
    build it. It builds fine, but the tests fail. Unfortunately for me, this
    test is indicative of the exact functionality I require.

    What's wierd is that the test fails on ruby 1.8.2, but it passes on ruby
    1.8.4. Does anyone have any ideas about why this would occur and what I
    can do about it (other than just moving up to 1.8.4...) ?

    Output from attempt with 1.8.2:

    <snip>
    rodimus:~/ruby-rbtree> ruby extconf.rb
    checking for allocation framework... yes
    checking for rb_obj_init_copy()... yes
    checking for rb_block_proc()... yes
    checking for rb_yield_values()... yes
    checking for rb_marshal_dump()... yes
    checking for rb_marshal_load()... yes
    checking for inline keyword... __inline
    creating Makefile
    rodimus:~/ruby-rbtree> make
    gcc -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -fPIC -std=c89 -pedantic
    -Wall -Wno-long-long -I. -I/usr/lib/ruby/1.8/i386-linux
    -I/usr/lib/ruby/1.8/i386-linux -I. -DNDEBUG -DHAVE_OBJECT_ALLOCATE
    -DHAVE_RB_OBJ_INIT_COPY -DHAVE_RB_BLOCK_PROC -DHAVE_RB_YIELD_VALUES
    -DHAVE_RB_MARSHAL_DUMP -DHAVE_RB_MARSHAL_LOAD -Dinline=__inline -c
    dict.c
    gcc -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -fPIC -std=c89 -pedantic
    -Wall -Wno-long-long -I. -I/usr/lib/ruby/1.8/i386-linux
    -I/usr/lib/ruby/1.8/i386-linux -I. -DNDEBUG -DHAVE_OBJECT_ALLOCATE
    -DHAVE_RB_OBJ_INIT_COPY -DHAVE_RB_BLOCK_PROC -DHAVE_RB_YIELD_VALUES
    -DHAVE_RB_MARSHAL_DUMP -DHAVE_RB_MARSHAL_LOAD -Dinline=__inline -c
    rbtree.c
    gcc -shared -L'/usr/lib' -Wl,-R'/usr/lib' -o rbtree.so dict.o rbtree.o
    -Wl,-R -Wl,/usr/lib -L/usr/lib -L. -lruby -ldl -lcrypt -lm -lc
    rodimus:~/ruby-rbtree> ruby test.rb
    Loaded suite test
    Started
    ....................................................test.rb:201:
    warning: block supersedes default value argument
    ...............F................
    Finished in 0.02627 seconds.

    1) Failure:
    test_readjust(RBTreeTest) [test.rb:592]:
    <ArgumentError> exception expected but was
    Class: <NoMethodError>
    Message: <"undefined method `>' for false:FalseClass">
    ---Backtrace---
    test.rb:592:in `readjust'
    test.rb:592:in `test_readjust'
    test.rb:592:in `assert_raise'
    test.rb:592:in `test_readjust'
    ---------------

    84 tests, 278 assertions, 1 failures, 0 errors
    rodimus:~/ruby-rbtree> ruby --version
    ruby 1.8.2 (2004-12-25) [i386-linux]
    rodimus:~/ruby-rbtree>
    </snip>

    Here's the output from the same process on Ruby 1.8.4 (extconf and make
    output removed for brevity):

    <snip>
    puma:~/rbtree-0.1.3> ruby test.rb
    Loaded suite test
    Started
    ....................................................test.rb:201:
    warning: block supersedes default value argument
    ...............test.rb:609: warning: RBTree#readjust() uses current
    comparison block, use RBTree#readjust(nil) to set default comparison
    block
    .................
    Finished in 0.134389 seconds.

    84 tests, 287 assertions, 0 failures, 0 errors
    puma:~/rbtree-0.1.3> ruby --version
    ruby 1.8.4 (2005-12-24) [i686-linux]
    puma:~/rbtree-0.1.3>
    </snip>

    --
    Toby DiPasquale

    --
    Posted via http://www.ruby-forum.com/.
     
    Toby DiPasquale, Mar 8, 2006
    #1
    1. Advertising

  2. Toby DiPasquale

    Guest

    On Thu, 9 Mar 2006, Toby DiPasquale wrote:

    > Hi all,
    >
    > I dug up the rbtree 0.1.3 tarball from the RAA cache and am trying to
    > build it. It builds fine, but the tests fail. Unfortunately for me, this
    > test is indicative of the exact functionality I require.
    >
    > What's wierd is that the test fails on ruby 1.8.2, but it passes on ruby
    > 1.8.4. Does anyone have any ideas about why this would occur and what I
    > can do about it (other than just moving up to 1.8.4...) ?


    i can confirm the above at least... may have time later to look into it.


    more later...

    -a

    --
    knowledge is important, but the much more important is the use toward which it
    is put. this depends on the heart and mine the one who uses it.
    - h.h. the 14th dali lama
     
    , Mar 8, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    8
    Views:
    892
  2. Margie Roginski
    Replies:
    3
    Views:
    540
    Jean-Paul Calderone
    Aug 25, 2010
  3. Joel VanderWerf

    priority queue using RBTree

    Joel VanderWerf, Mar 9, 2005, in forum: Ruby
    Replies:
    2
    Views:
    101
    Martin DeMello
    Mar 11, 2005
  4. Martin DeMello

    [RCR] rbtree in the stdlib

    Martin DeMello, May 14, 2005, in forum: Ruby
    Replies:
    0
    Views:
    96
    Martin DeMello
    May 14, 2005
  5. dayo
    Replies:
    11
    Views:
    347
    Ilya Zakharevich
    Dec 16, 2005
Loading...

Share This Page