-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes for single array block argument
- Loading branch information
1 parent
f8903e3
commit d9a60f2
Showing
6 changed files
with
55 additions
and
60 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,9 @@ | ||
fails:A block yielded a single Array assigns the Array to a single rest argument | ||
fails:A block yielded a single Array assigns nil to unassigned required arguments | ||
fails:A block yielded a single Array assigns elements to post arguments | ||
fails:A block yielded a single Array assigns the last element to a non-keyword argument if #to_hash returns nil | ||
fails:A block yielded a single Array raises a TypeError if #to_hash does not return a Hash | ||
fails:A block yielded a single Object calls #to_ary on the object when taking multiple arguments | ||
fails:A block yielded a single Object receives the object if #to_ary returns nil | ||
fails:A block yielded a single Object raises a TypeError if #to_ary does not return an Array | ||
fails:A block allows to define a block variable with the same name as the enclosing block | ||
fails:A block does not capture a local when the block argument has the same name | ||
fails:A block taking |a| arguments assigns the first value yielded to the argument | ||
fails:A block taking |a, b| arguments destructures a splatted Array | ||
fails:A block taking |a, b| arguments calls #to_ary to convert a single yielded object to an Array | ||
fails:A block taking |a, b| arguments raises a TypeError if #to_ary does not return an Array | ||
fails:A block taking |a, b| arguments raises the original exception if #to_ary raises an exception | ||
fails:A block taking |a, *b| arguments destructures a splatted Array | ||
fails:A block taking |a, *b| arguments calls #to_ary to convert a single yielded object to an Array | ||
fails:A block taking |a, *b| arguments raises a TypeError if #to_ary does not return an Array | ||
fails:A block taking |*a| arguments assigns '[[]]' to the argument when passed an empty Array | ||
fails:A block taking |*a| arguments assigns a single Array value passed to the argument by wrapping it in an Array | ||
fails:A block taking |*a| arguments does not call #to_ary if the single yielded object is an Array | ||
fails:A block taking |a, | arguments calls #to_ary to convert a single yielded object to an Array | ||
fails:A block taking |a, | arguments raises a TypeError if #to_ary does not return an Array | ||
fails:A block taking |(a, b), c| arguments calls #to_ary to convert a single yielded object to an Array | ||
fails:A block taking |*a| arguments assigns all the values passed to the argument as an Array | ||
fails:A block taking |*a, b:| merges the hash into the splatted array | ||
fails:A block arguments with _ extracts arguments with _ | ||
fails:A block arguments with _ assigns the first variable named |
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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
fails:A Proc taking |a, b| arguments does not call #to_ary to convert a single passed object to an Array | ||
fails:A Proc taking |a, *b| arguments does not destructure a single Array value yielded | ||
fails:A Proc taking |a, *b| arguments does not call #to_ary to convert a single passed object to an Array | ||
fails:A Proc taking |a, | arguments does not destructure when passed a single Array | ||
fails:A Proc taking |a, | arguments does not call #to_ary to convert a single passed object to an Array |
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 |
---|---|---|
@@ -1,17 +1,20 @@ | ||
fails:The yield call taking no arguments raises a LocalJumpError when the method is not passed a block | ||
fails:The yield call taking no arguments ignores assignment to the explicit block argument and calls the passed block | ||
fails:The yield call taking a single argument when no block is given raises a LocalJumpError | ||
fails:The yield call taking a single argument yielding to a literal block passes an empty Array when the argument is an empty Array | ||
fails:The yield call taking a single argument yielding to a literal block passes a single, multi-value Array | ||
fails:The yield call taking a single argument yielding to a lambda passes an empty Array when the argument is an empty Array | ||
fails:The yield call taking a single argument yielding to a lambda passes a single, multi-value Array | ||
fails:The yield call taking a single argument yielding to a lambda should not destructure an Array into multiple arguments | ||
fails:The yield call taking multiple arguments raises a LocalJumpError when the method is not passed a block | ||
fails:The yield call taking a single splatted argument raises a LocalJumpError when the method is not passed a block | ||
fails:The yield call taking a single splatted argument passes a single value | ||
fails:The yield call taking a single splatted argument passes no arguments when the argument is an empty Array | ||
fails:The yield call taking a single splatted argument passes the value when the argument is an Array containing a single value | ||
fails:The yield call taking a single splatted argument passes the values of the Array as individual arguments | ||
fails:The yield call taking a single splatted argument passes the element of a single element Array | ||
fails:The yield call taking a single splatted argument passes no values when give nil as an argument | ||
fails:The yield call taking multiple arguments with a splat raises a LocalJumpError when the method is not passed a block | ||
fails:The yield call taking multiple arguments with a splat passes the arguments to the block | ||
fails:The yield call taking multiple arguments with a splat does not pass an argument value if the splatted argument is an empty Array | ||
fails:The yield call taking multiple arguments with a splat passes the Array elements as arguments if the splatted argument is a non-empty Array | ||
fails:The yield call taking multiple arguments with a splat does not pass an argument value if the splatted argument is nil | ||
fails:The yield call taking matching arguments with splats and post args raises a LocalJumpError when the method is not passed a block | ||
fails:The yield call taking matching arguments with splats and post args passes the arguments to the block | ||
fails:The yield call taking a splat and a keyword argument passes it as an array of the values and a hash |
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
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