# \[patch\] Fixes for Array#\[\]=

**URL:** <https://www.ruby-forum.com/t/patch-fixes-for-array/165505>\
**Category:** IronRuby\
**Created:** [April 14, 2009, 4:46pm UTC](https://www.ruby-forum.com/t/patch-fixes-for-array/165505 "2009-04-14T16:46:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![murena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7ba0ec/32.png) [@murena](https://www.ruby-forum.com/u/murena)\
**Post date:** [April 14, 2009, 4:46pm UTC](https://www.ruby-forum.com/t/patch-fixes-for-array/165505/1 "2009-04-14T16:46:45Z")

</div>

Hi,

I’ve just committed my first patch to IronRuby on my forked  
repository, this is the URL for the diff:

> <https://github.com/nrk/ironruby/commit/7b819d65bd26c0642f88ab30e8ccc17d9e625fcf>

This patch fixes 4 failures in core/array/element\_set\_spec.rb, namely:

Array#[]= inserts the given elements with [range] which the range is  
zero-width  
Array#[]= inserts the given elements with [start, length] which length  
is zero  
Array#[]= inserts the given elements with [range] which the range has  
negative width  
Array#[]= with [index, count] inserts other section in place defined by  
idx

The patch itself is nothing special, but it is needed to run  
ironruby-hpricot out of the box on IronRuby.

Thanks,  
Daniele

–  
Daniele A.  
[http://www.clorophilla.net/blog/](http://www.clorophilla.net/blog/)  
[http://twitter.com/JoL1hAHN](http://twitter.com/JoL1hAHN)

---

<div class="post-metadata">

**Author:** ![murena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7ba0ec/32.png) [@murena](https://www.ruby-forum.com/u/murena)\
**Post date:** [April 14, 2009, 11:57pm UTC](https://www.ruby-forum.com/t/patch-fixes-for-array/165505/2 "2009-04-14T23:57:43Z")

</div>

Changes look good! Thanks for the patch, Daniele!

Note that the tags should be deleted once the bug is fixed. That way,  
running irtests.bat will run the specs you have just enabled and ensure  
that you really have fixed the issue. Deleting the tags should be in the  
same commit as the source code fix.

I have deleted the tags and pushed it to

> <https://github.com/shri-zz/ironruby/commit/95d1a8410d2bbabd37e27314da1c504cc486a711>

Thanks,  
Shri

---

<div class="post-metadata">

**Author:** ![murena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7ba0ec/32.png) [@murena](https://www.ruby-forum.com/u/murena)\
**Post date:** [April 15, 2009, 11:15am UTC](https://www.ruby-forum.com/t/patch-fixes-for-array/165505/3 "2009-04-15T11:15:43Z")

</div>

Cool. More patches to come 🙂  
I’ll make sure to include changes/removals of the tags files in the  
next commits.

On Tue, Apr 14, 2009 at 23:18, Shri B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Changes look good! Thanks for the patch, Daniele!
> 
> Note that the tags should be deleted once the bug is fixed. That way, running irtests.bat will run the specs you have just enabled and ensure that you really have fixed the issue. Deleting the tags should be in the same commit as the source code fix.
> 
> I have deleted the tags and pushed it to  
> [Delete tags for Array[]= · shri-zz/ironruby@95d1a84 · GitHub](http://github.com/shri/ironruby/commit/95d1a8410d2bbabd37e27314da1c504cc486a711)
> 
> Thanks,  
> Shri

–  
Daniele A.  
[http://www.clorophilla.net/blog/](http://www.clorophilla.net/blog/)  
[http://twitter.com/JoL1hAHN](http://twitter.com/JoL1hAHN)
