Forum: IronRuby Review: Array#hash and irtests.bat

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Shri B. (Guest)
on 2009-04-18 02:22
(Received via mailing list)
http://github.com/shri/ironruby/commit/7f3d766216c...

*         Fixes Array#hash to work with recursive arrays

*         Also updated ArraySpecs.recursive_array to produce a cycle of
length 3. Previously, it was doing "a << a" multiple times, but this
does not increase the length of the cycle above 2. It just increase the
number of cycles. This change required an update to many files.

*         Also added a new ArraySpecs.recursive_arrays function which
should be used when dealing with two arrays (comparisons, merge, etc). I
have only used it in equal_value_spec and eql_spec for now...

*         Also removed entries from critical_tags.txt since recursive
hashing and comparison now works.

http://github.com/shri/ironruby/commit/a011753ebab...

*         Changed irtests.bat to not use "mspec -V" (unless you are
using "irtests -par") which was causing very verbose output

*         Changed irtests.bat to only use two "mspec" tasks so that
"irtest -par" will spawn fewer processes.

*         Changed IronRuby.Tests.exe to show dots for each test instead
of printing a new line which is very verbose

*         Changed irtests.bat to continue running tests even if previous
test task failed. It remembers the failed results and prints the summary
at the end.

*         Added ruby19.bat so that "mspec -tr19" runs with Ruby 1.9. It
requires you to set RUBY19_EXE to point to your copy of the 1.9 version
of ruby.exe

Thanks,
Shri
Tomas M. (Guest)
on 2009-04-20 20:37
(Received via mailing list)
Re RubyArray.Equals(object)/GetHashCode: is it desirable to use value
equality here? These methods are only used from .NET libraries - e.g. if
the array is added into a dictionary as a key. Unless RubyArray is bound
to a runtime its .NET hash/equality implementation won't be the same as
Ruby's (ie. calling hash/eql? one each element). Wouldn't be better if
RubyArray behaved like List<object> in .NET collections?

Tomas

From: Shri B.
Sent: Friday, April 17, 2009 3:22 PM
To: IronRuby External Code R.
Cc: removed_email_address@domain.invalid
Subject: Review: Array#hash and irtests.bat

http://github.com/shri/ironruby/commit/7f3d766216c...

*         Fixes Array#hash to work with recursive arrays

*         Also updated ArraySpecs.recursive_array to produce a cycle of
length 3. Previously, it was doing "a << a" multiple times, but this
does not increase the length of the cycle above 2. It just increase the
number of cycles. This change required an update to many files.

*         Also added a new ArraySpecs.recursive_arrays function which
should be used when dealing with two arrays (comparisons, merge, etc). I
have only used it in equal_value_spec and eql_spec for now...

*         Also removed entries from critical_tags.txt since recursive
hashing and comparison now works.

http://github.com/shri/ironruby/commit/a011753ebab...

*         Changed irtests.bat to not use "mspec -V" (unless you are
using "irtests -par") which was causing very verbose output

*         Changed irtests.bat to only use two "mspec" tasks so that
"irtest -par" will spawn fewer processes.

*         Changed IronRuby.Tests.exe to show dots for each test instead
of printing a new line which is very verbose

*         Changed irtests.bat to continue running tests even if previous
test task failed. It remembers the failed results and prints the summary
at the end.

*         Added ruby19.bat so that "mspec -tr19" runs with Ruby 1.9. It
requires you to set RUBY19_EXE to point to your copy of the 1.9 version
of ruby.exe

Thanks,
Shri
Shri B. (Guest)
on 2009-04-21 08:15
(Received via mailing list)
Mspec seems to be returning the wrong exitcode when used from
irtests.bat. The first mspec command which runs the core tests has
failures in Module#autoload but sets errorlevel to 0. And the second
command has no failures but sets errorlevel to 1. When I try out some
mspec commands manually, the errorlevel does seem to be set correctly.
So I am not sure why this is happenning. Once Jim pulls in my changes,
lets see if others get the incorrect behavior or not, and then we can
decide what to do. Jim, if you have any ideas of what might affect the
exitcode, let me know...

About RubyArray.Equals(object)/GetHashCode, I will be changing it in a
subsequent change to have it do reference equality.

From: Tomas M.
Sent: Monday, April 20, 2009 9:32 AM
To: Shri B.; IronRuby External Code R.
Cc: removed_email_address@domain.invalid
Subject: RE: Review: Array#hash and irtests.bat

Re RubyArray.Equals(object)/GetHashCode: is it desirable to use value
equality here? These methods are only used from .NET libraries - e.g. if
the array is added into a dictionary as a key. Unless RubyArray is bound
to a runtime its .NET hash/equality implementation won't be the same as
Ruby's (ie. calling hash/eql? one each element). Wouldn't be better if
RubyArray behaved like List<object> in .NET collections?

Tomas

From: Shri B.
Sent: Friday, April 17, 2009 3:22 PM
To: IronRuby External Code R.
Cc: removed_email_address@domain.invalid
Subject: Review: Array#hash and irtests.bat

http://github.com/shri/ironruby/commit/7f3d766216c...

*         Fixes Array#hash to work with recursive arrays

*         Also updated ArraySpecs.recursive_array to produce a cycle of
length 3. Previously, it was doing "a << a" multiple times, but this
does not increase the length of the cycle above 2. It just increase the
number of cycles. This change required an update to many files.

*         Also added a new ArraySpecs.recursive_arrays function which
should be used when dealing with two arrays (comparisons, merge, etc). I
have only used it in equal_value_spec and eql_spec for now...

*         Also removed entries from critical_tags.txt since recursive
hashing and comparison now works.

http://github.com/shri/ironruby/commit/a011753ebab...

*         Changed irtests.bat to not use "mspec -V" (unless you are
using "irtests -par") which was causing very verbose output

*         Changed irtests.bat to only use two "mspec" tasks so that
"irtest -par" will spawn fewer processes.

*         Changed IronRuby.Tests.exe to show dots for each test instead
of printing a new line which is very verbose

*         Changed irtests.bat to continue running tests even if previous
test task failed. It remembers the failed results and prints the summary
at the end.

*         Added ruby19.bat so that "mspec -tr19" runs with Ruby 1.9. It
requires you to set RUBY19_EXE to point to your copy of the 1.9 version
of ruby.exe

Thanks,
Shri
Jim D. (Guest)
on 2009-04-21 10:10
(Received via mailing list)
Test looks good.

JD

From: Tomas M.
Sent: Monday, April 20, 2009 9:32 AM
To: Shri B.; IronRuby External Code R.
Cc: removed_email_address@domain.invalid
Subject: RE: Review: Array#hash and irtests.bat

Re RubyArray.Equals(object)/GetHashCode: is it desirable to use value
equality here? These methods are only used from .NET libraries - e.g. if
the array is added into a dictionary as a key. Unless RubyArray is bound
to a runtime its .NET hash/equality implementation won't be the same as
Ruby's (ie. calling hash/eql? one each element). Wouldn't be better if
RubyArray behaved like List<object> in .NET collections?

Tomas

From: Shri B.
Sent: Friday, April 17, 2009 3:22 PM
To: IronRuby External Code R.
Cc: removed_email_address@domain.invalid
Subject: Review: Array#hash and irtests.bat

http://github.com/shri/ironruby/commit/7f3d766216c...

*         Fixes Array#hash to work with recursive arrays

*         Also updated ArraySpecs.recursive_array to produce a cycle of
length 3. Previously, it was doing "a << a" multiple times, but this
does not increase the length of the cycle above 2. It just increase the
number of cycles. This change required an update to many files.

*         Also added a new ArraySpecs.recursive_arrays function which
should be used when dealing with two arrays (comparisons, merge, etc). I
have only used it in equal_value_spec and eql_spec for now...

*         Also removed entries from critical_tags.txt since recursive
hashing and comparison now works.

http://github.com/shri/ironruby/commit/a011753ebab...

*         Changed irtests.bat to not use "mspec -V" (unless you are
using "irtests -par") which was causing very verbose output

*         Changed irtests.bat to only use two "mspec" tasks so that
"irtest -par" will spawn fewer processes.

*         Changed IronRuby.Tests.exe to show dots for each test instead
of printing a new line which is very verbose

*         Changed irtests.bat to continue running tests even if previous
test task failed. It remembers the failed results and prints the summary
at the end.

*         Added ruby19.bat so that "mspec -tr19" runs with Ruby 1.9. It
requires you to set RUBY19_EXE to point to your copy of the 1.9 version
of ruby.exe

Thanks,
Shri
This topic is locked and can not be replied to.