-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add lambda keyword argument to Proc#parameters
Co-authored-by: Jose Narvaez <jose.narvaez@shopify.com>
- Loading branch information
1 parent
90bfaa0
commit d9469bf
Showing
5 changed files
with
21 additions
and
9 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
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 |
---|---|---|
@@ -1,6 +1,3 @@ | ||
fails:Proc#parameters sets the first element of each sub-Array to :req for required argument if lambda keyword used | ||
fails:Proc#parameters regards named parameters in procs as required if lambda keyword used | ||
fails:Proc#parameters regards named parameters in lambda as optional if lambda: false keyword used | ||
fails:Proc#parameters adds rest arg with name * for "star" argument | ||
fails:Proc#parameters adds keyrest arg with ** as a name for "double star" argument | ||
fails:Proc#parameters adds block arg with name & for anonymous block argument |
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 |
---|---|---|
|
@@ -128,4 +128,8 @@ def <<(other) | |
end | ||
end | ||
end | ||
|
||
def parameters(lambda: nil) | ||
Primitive.proc_parameters(self, lambda) | ||
end | ||
end |