Array Specs


#1

I’ve been working on bringing IronRuby up to speed with rubyspec, and
picked the core\array folder as a start:

My pull request is here:

I’d like to fix them all, but I’m not sure if I’ll have the time to do
so

Here is a summary of the rubyspec\core\array folder as of right now:

ok means the spec was already passing
fixed means the spec was failing, and I have fixed it
FAILS means the specs fail, and I have not fixed them yet

ok allocate_spec.rb
ok append_spec.rb
ok array_spec.rb
ok assoc_spec.rb
ok at_spec.rb
ok choice_spec.rb
ok clear_spec.rb
ok clone_spec.rb
ok collect_spec.rb
ok combination_spec.rb
ok compact_spec.rb
ok comparison_spec.rb
ok concat_spec.rb
ok constructor_spec.rb
ok count_spec.rb
ok cycle_spec.rb
ok delete_at_spec.rb
ok delete_if_spec.rb
ok delete_spec.rb
ok drop_spec.rb
ok drop_while_spec.rb
ok dup_spec.rb
ok each_index_spec.rb
ok each_spec.rb
ok element_reference_spec.rb
fixed element_set_spec.rb
ok empty_spec.rb
ok eql_spec.rb
ok equal_value_spec.rb
ok fetch_spec.rb
fixed fill_spec.rb
ok find_index_spec.rb
ok first_spec.rb
FAILS flatten_spec.rb
ok frozen_spec.rb
FAILS hash_spec.rb
ok include_spec.rb
ok indexes_spec.rb
ok index_spec.rb
ok indices_spec.rb
ok initialize_copy_spec.rb
ok initialize_spec.rb
ok insert_spec.rb
FAILS inspect_spec.rb
ok intersection_spec.rb
FAILS join_spec.rb
FAILS keep_if_spec.rb
ok last_spec.rb
ok length_spec.rb
ok map_spec.rb
ok minus_spec.rb
FAILS multiply_spec.rb
ok new_spec.rb
ok nitems_spec.rb
FAILS in MRI also pack_spec.rb
ok partition_spec.rb
ok permutation_spec.rb
ok plus_spec.rb
FAILS pop_spec.rb
!! HANGS product_spec.rb
ok push_spec.rb
ok rassoc_spec.rb
ok reject_spec.rb
FAILS repeated_combination_spec.rb
FAILS repeated_permutation_spec.rb
ok replace_spec.rb
ok reverse_each_spec.rb
ok reverse_spec.rb
FAILS rindex_spec.rb
FAILS rotate_spec.rb
fixed sample_spec.rb
fixed select_spec.rb
fixed shift_spec.rb
fixed shuffle_spec.rb
ok size_spec.rb
FAILS slice_spec.rb
FAILS hard to fix sort_by_spec.rb
FAILS hard to fix sort_spec.rb
ok take_spec.rb
ok take_while_spec.rb
ok to_ary_spec.rb
ok to_a_spec.rb
ok to_s_spec.rb
ok transpose_spec.rb
ok try_convert_spec.rb
ok union_spec.rb
fixed uniq_spec.rb
ok unshift_spec.rb
ok values_at_spec.rb
fixed zip_spec.rb


#2

Cool! I’ll take a look asap.

Tomas

From: removed_email_address@domain.invalid
[mailto:removed_email_address@domain.invalid] On Behalf Of Orion E.
Sent: Wednesday, January 04, 2012 1:54 PM
To: removed_email_address@domain.invalid
Subject: [Ironruby-core] Array Specs

I’ve been working on bringing IronRuby up to speed with rubyspec, and
picked the core\array folder as a start:

My pull request is here:

https://github.com/IronLanguages/main/pull/52

I’d like to fix them all, but I’m not sure if I’ll have the time to do
so -

Here is a summary of the rubyspec\core\array folder as of right now:

ok means the spec was already passing
fixed means the spec was failing, and I have fixed it
FAILS means the specs fail, and I have not fixed them yet

ok allocate_spec.rb
ok append_spec.rb
ok array_spec.rb
ok assoc_spec.rb
ok at_spec.rb
ok choice_spec.rb
ok clear_spec.rb
ok clone_spec.rb
ok collect_spec.rb
ok combination_spec.rb
ok compact_spec.rb
ok comparison_spec.rb
ok concat_spec.rb
ok constructor_spec.rb
ok count_spec.rb
ok cycle_spec.rb
ok delete_at_spec.rb
ok delete_if_spec.rb
ok delete_spec.rb
ok drop_spec.rb
ok drop_while_spec.rb
ok dup_spec.rb
ok each_index_spec.rb
ok each_spec.rb
ok element_reference_spec.rb
fixed element_set_spec.rb
ok empty_spec.rb
ok eql_spec.rb
ok equal_value_spec.rb
ok fetch_spec.rb
fixed fill_spec.rb
ok find_index_spec.rb
ok first_spec.rb
FAILS flatten_spec.rb
ok frozen_spec.rb
FAILS hash_spec.rb
ok include_spec.rb
ok indexes_spec.rb
ok index_spec.rb
ok indices_spec.rb
ok initialize_copy_spec.rb
ok initialize_spec.rb
ok insert_spec.rb
FAILS inspect_spec.rb
ok intersection_spec.rb
FAILS join_spec.rb
FAILS keep_if_spec.rb
ok last_spec.rb
ok length_spec.rb
ok map_spec.rb
ok minus_spec.rb
FAILS multiply_spec.rb
ok new_spec.rb
ok nitems_spec.rb
FAILS in MRI also pack_spec.rb
ok partition_spec.rb
ok permutation_spec.rb
ok plus_spec.rb
FAILS pop_spec.rb
!! HANGS product_spec.rb
ok push_spec.rb
ok rassoc_spec.rb
ok reject_spec.rb
FAILS repeated_combination_spec.rb
FAILS repeated_permutation_spec.rb
ok replace_spec.rb
ok reverse_each_spec.rb
ok reverse_spec.rb
FAILS rindex_spec.rb
FAILS rotate_spec.rb
fixed sample_spec.rb
fixed select_spec.rb
fixed shift_spec.rb
fixed shuffle_spec.rb
ok size_spec.rb
FAILS slice_spec.rb
FAILS hard to fix sort_by_spec.rb
FAILS hard to fix sort_spec.rb
ok take_spec.rb
ok take_while_spec.rb
ok to_ary_spec.rb
ok to_a_spec.rb
ok to_s_spec.rb
ok transpose_spec.rb
ok try_convert_spec.rb
ok union_spec.rb
fixed uniq_spec.rb
ok unshift_spec.rb
ok values_at_spec.rb
fixed zip_spec.rb


#3

I’ve pushed some more changes to that branch:

fixed pop_spec.rb
fixed rindex_spec.rb
fixed rotate_spec.rb
fixed flatten_spec.rb

I also had a look at a couple of others but didn’t fix them:

hash_spec.rb
This requires changing implementation of RubyArray#GetHashCode which I
wasn’t confident enough to do
In ruby, a recursive array equals itself, and therefore the hashcodes
should match. IronRuby’s implementation of hash doesn’t support this.
Furthermore, the following code should pass, which seemed quite a bit
harder:

a = [1]
a << a
[1,a] == a # both MRI and IR report true for this
[1,a].hash == a.hash # Because objects are equal, hash should be too.
MRI
supports this, IR does not.

product_spec.rb
This was causing the tests to hang/crash because IR wasn’t sanity
checking
lengths. Rubyspec has a test which tries to create a stupdendously large
product array, and so IR would run out of memory.
I added range checking so the tests no longer hang/crash, but there is
some additional behaviour (you can pass a block to Array#product in 1.9)
that I haven’t implemented.

Here’s the output for mspec of the array folder:

IR

Finished in 18.282046 seconds
112 files, 2393 examples, 4819 expectations, 191 failures, 72 errors

MRI 1.9.2 p290

Finished in 2.189125 seconds
112 files, 2393 examples, 4922 expectations, 162 failures, 0 errors

Thanks, Orion

From: Tomas M. removed_email_address@domain.invalid
To: “removed_email_address@domain.invalid” removed_email_address@domain.invalid
Date: 05/01/2012 05:59 p.m.
Subject: Re: [Ironruby-core] Array Specs
Sent by: removed_email_address@domain.invalid

Cool! I?ll take a look asap.

Tomas

From: removed_email_address@domain.invalid [
mailto:removed_email_address@domain.invalid] On Behalf Of Orion E.
Sent: Wednesday, January 04, 2012 1:54 PM
To: removed_email_address@domain.invalid
Subject: [Ironruby-core] Array Specs

I’ve been working on bringing IronRuby up to speed with rubyspec, and
picked the core\array folder as a start:

My pull request is here:

https://github.com/IronLanguages/main/pull/52

I’d like to fix them all, but I’m not sure if I’ll have the time to do
so

Here is a summary of the rubyspec\core\array folder as of right now:

ok means the spec was already passing
fixed means the spec was failing, and I have fixed it
FAILS means the specs fail, and I have not fixed them yet

ok allocate_spec.rb
ok append_spec.rb
ok array_spec.rb
ok assoc_spec.rb
ok at_spec.rb
ok choice_spec.rb
ok clear_spec.rb
ok clone_spec.rb
ok collect_spec.rb
ok combination_spec.rb
ok compact_spec.rb
ok comparison_spec.rb
ok concat_spec.rb
ok constructor_spec.rb
ok count_spec.rb
ok cycle_spec.rb
ok delete_at_spec.rb
ok delete_if_spec.rb
ok delete_spec.rb
ok drop_spec.rb
ok drop_while_spec.rb
ok dup_spec.rb
ok each_index_spec.rb
ok each_spec.rb
ok element_reference_spec.rb
fixed element_set_spec.rb
ok empty_spec.rb
ok eql_spec.rb
ok equal_value_spec.rb
ok fetch_spec.rb
fixed fill_spec.rb
ok find_index_spec.rb
ok first_spec.rb
FAILS flatten_spec.rb
ok frozen_spec.rb
FAILS hash_spec.rb
ok include_spec.rb
ok indexes_spec.rb
ok index_spec.rb
ok indices_spec.rb
ok initialize_copy_spec.rb
ok initialize_spec.rb
ok insert_spec.rb
FAILS inspect_spec.rb
ok intersection_spec.rb
FAILS join_spec.rb
FAILS keep_if_spec.rb
ok last_spec.rb
ok length_spec.rb
ok map_spec.rb
ok minus_spec.rb
FAILS multiply_spec.rb
ok new_spec.rb
ok nitems_spec.rb
FAILS in MRI also pack_spec.rb
ok partition_spec.rb
ok permutation_spec.rb
ok plus_spec.rb
FAILS pop_spec.rb
!! HANGS product_spec.rb
ok push_spec.rb
ok rassoc_spec.rb
ok reject_spec.rb
FAILS repeated_combination_spec.rb
FAILS repeated_permutation_spec.rb
ok replace_spec.rb
ok reverse_each_spec.rb
ok reverse_spec.rb
FAILS rindex_spec.rb
FAILS rotate_spec.rb
fixed sample_spec.rb
fixed select_spec.rb
fixed shift_spec.rb
fixed shuffle_spec.rb
ok size_spec.rb
FAILS slice_spec.rb
FAILS hard to fix sort_by_spec.rb
FAILS hard to fix sort_spec.rb
ok take_spec.rb
ok take_while_spec.rb
ok to_ary_spec.rb
ok to_a_spec.rb
ok to_s_spec.rb
ok transpose_spec.rb
ok try_convert_spec.rb
ok union_spec.rb
fixed uniq_spec.rb
ok unshift_spec.rb
ok values_at_spec.rb
fixed zip_spec.rb


#4

Ironruby-core mailing list
removed_email_address@domain.invalid
http://rubyforge.org/mailman/listinfo/ironruby-core