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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20120105/55d42d81/attachment.html>
Cool! I''ll take a look asap. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Wednesday, January 04, 2012 1:54 PM To: ironruby-core at rubyforge.org 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20120105/87ab42df/attachment-0001.html>
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 Matousek <Tomas.Matousek at microsoft.com> To: "ironruby-core at rubyforge.org" <ironruby-core at rubyforge.org> Date: 05/01/2012 05:59 p.m. Subject: Re: [Ironruby-core] Array Specs Sent by: ironruby-core-bounces at rubyforge.org Cool! I?ll take a look asap. Tomas From: ironruby-core-bounces at rubyforge.org [ mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Wednesday, January 04, 2012 1:54 PM To: ironruby-core at rubyforge.org 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 _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20120106/fa93c356/attachment-0001.html>
More updates: * Fixes implementation of Array#sample to not use CLR ArrayList internally (it''s not available on silverlight) * Fixes Array#slice to deal with out-of-range parameters * Fixes Array#inspect to taint correctly * Implements Array#keep_if * Fixes Array#product to deal with blocks correctly The only things left unfixed in that folder are as follows: hash_spec.rb - requires changing implementation of RubyArray#hash which seems dangerous join_spec.rb, multiply_spec.rb - Both of these fail because the specs expect ruby to call .to_str on objects inside arrays. The problem is that the mock objects in the spec implement to_str using method missing, but they don''t implement respond_to?. IronRuby''s Protocols.CastToStr always checks respond_to? before invoking to_str and thus it fails... sort_by_spec.rb - seems to require full reimplementation of sorting to not use the CLR QuickSort algorithm sort_spec.rb - seems to require full reimplementation of sorting to not use the CLR QuickSort algorithm repeated_combination_spec.rb - didn''t get to it, it seems like a really obscure method repeated_permutation_spec.rb - didn''t get to it, it seems like a really obscure method I''m not sure that I have the ability to fix the above issues without some help, so I''d like to say my work on the array specs is done for now, and hopefully it can be merged into IronRuby main. The pull request is here: https://github.com/IronLanguages/main/pull/52 Regards Orion ______________________________________________________ Orion Edwards | Technical Leader PHONE +64 7 838 9800 | FAX +64 7 838 9801 | EMAIL orion.edwards at gallagher.co | WEB www.gallagher.co From: Tomas Matousek <Tomas.Matousek at microsoft.com> To: "ironruby-core at rubyforge.org" <ironruby-core at rubyforge.org> Date: 05/01/2012 05:59 p.m. Subject: Re: [Ironruby-core] Array Specs Sent by: ironruby-core-bounces at rubyforge.org Cool! I?ll take a look asap. Tomas From: ironruby-core-bounces at rubyforge.org [ mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Wednesday, January 04, 2012 1:54 PM To: ironruby-core at rubyforge.org 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 _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20120201/f07c6703/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 3465 bytes Desc: not available URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20120201/f07c6703/attachment-0001.gif>