Well, some answers although I don't know how to solve them yet.
The problem with the symbols, the exception is raised into the mspec code,
in the file lib/mspec/mocks/mock.rb line 35. There is a find method that
iterates over an array of arrays, and in some cases instead of execute the
block passing it an array, it passes the first element of the array, I wrote
some debug info:

HAS_KEYS? [[:"__mspec_14_eql?__", :eql?], [:"__mspec_16_eql?__", :eql?],
[:__mspec_14_hash__, :hash]]
INSPECT :"__mspec_14_eql?__" SYM __mspec_16_hash__
undefined method `first' for :"__mspec_14_eql?__":Symbol
/Users/david/dev/mspec/lib/mspec/mocks/mock.rb:37:in `has_key?'
/Users/david/dev/mspec/lib/mspec/mocks/mock.rb:35:in `each'
/Users/david/dev/mspec/lib/mspec/mocks/mock.rb:35:in `find'
/Users/david/dev/mspec/lib/mspec/mocks/mock.rb:35:in `has_key?'
/Users/david/dev/mspec/lib/mspec/mocks/mock.rb:42:in `replaced?'
/Users/david/dev/mspec/lib/mspec/mocks/mock.rb:61:in `install_method'

The problem comparing objects seems coming from the object constructors. In
1.8 mode newArray method and others create a new object fine, but in 1.9
seems to copy the object or assign the same memory position.

More news coming.

On Mon, Sep 28, 2009 at 6:08 PM, Thomas E Enebo <[email protected]> wrote:

> For symbols there are a number of methods in 1.9 which return symbols
> instead of strings and I believe the specs have not been updated for
> this change between 1.8 and 1.9.
>
> In general, I think there are a number of ruby specs which are not
> right yet.  Just failing in a spec run for 1.9 is not enough to know
> about correct behavior.  We need to sleuth a little bit to make sure
> that the spec actually makes sense for 1.9 (which means running
> against 1.9.2preview2 and looking at source code).
>
> -Tom
>
> On Mon, Sep 28, 2009 at 11:00 AM, David Calavera
> <[email protected]> wrote:
> > Hi,
> >
> > I've seen some recurrent weird behaviour running specs with 1.9 mode that
> I
> > can't fix and perhaps you could give me some clues to resolve it.
> >
> > Some specs work fine in 1.8 mode, but, although the code is the same for
> 1.9
> > mode, they fail in 1.9 mode. I've copied two of them in this gist:
> >
> > http://gist.github.com/195524
> >
> > So, comments to solve this problem are welcome.
> >
> > Thank you
> >
>
>
>
> --
> blog: http://blog.enebo.com       twitter: tom_enebo
> mail: [email protected]
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>


-- 
David Calavera
http://www.thinkincode.net

Reply via email to