Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix rubyspecs for Array#[]= accepting index or index, size
- Loading branch information
1 parent
5ec2bdf
commit 087cc6a
Showing
4 changed files
with
553 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
opal_filter "Array#[]=" do | ||
fails "Array#[]= does not call to_ary on rhs array subclasses for multi-element sets" | ||
fails "Array#[]= calls to_ary on its rhs argument for multi-element sets" | ||
fails "Array#[]= raises an IndexError when passed indexes out of bounds" | ||
fails "Array#[]= tries to convert Range elements to Integers using #to_int with [m..n] and [m...n]" | ||
|
||
fails "Array#[]= with [m..n] accepts Range subclasses" | ||
fails "Array#[]= with [m..n] inserts the other section at m if m > n" | ||
fails "Array#[]= with [m..n] replaces the section if m < 0 and n > 0" | ||
fails "Array#[]= with [m..n] replaces the section if m and n < 0" | ||
fails "Array#[]= with [m..n] replaces the section defined by range" | ||
fails "Array#[]= with [m..n] just sets the section defined by range to nil if m and n < 0 and the rhs is nil" | ||
fails "Array#[]= with [m..n] just sets the section defined by range to nil even if the rhs is nil" | ||
|
||
fails "Array#[]= just inserts nil if the section defined by range has negative width and the rhs is nil" | ||
fails "Array#[]= just inserts nil if the section defined by range is zero-width and the rhs is nil" | ||
fails "Array#[]= inserts the given elements with [range] which the range has negative width" | ||
fails "Array#[]= inserts the given elements with [range] which the range is zero-width" | ||
fails "Array#[]= sets elements in the range arguments when passed ranges" | ||
fails "Array#[]= checks frozen before attempting to coerce arguments" | ||
fails "Array#[]= calls to_int on its start and length arguments" | ||
fails "Array#[]= just sets the section defined by range to other even if other is nil" | ||
fails "Array#[]= replaces the section defined by range with the given values" | ||
fails "Array#[]= sets the section defined by range to other" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.