-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added methods for table: clone, slice, keys, values...
For tuple: slice. For bytes and string: clone Added support for negative arguments for string.slice Changed API's for potion_type_error_want
- Loading branch information
Reini Urban
committed
Oct 20, 2013
1 parent
d0316fa
commit c2314c7
Showing
7 changed files
with
103 additions
and
59 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
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
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,10 +1,15 @@ | |||
t = (0,1,2) | t = (0,1,2) | ||
(t slice, | t slice(0,nil) say #=> (0, 1, 2) | ||
t slice(1), | t slice(1,nil) say #=> (1, 2) | ||
t slice(0,2), | t slice(0,1) say #=> (0, 1) | ||
t slice(-1), | t slice(-1,nil) say #=> (2) | ||
t slice(1,1), | t slice(1,1) say #=> (1) | ||
t slice(1,-1), | t slice(1,-1) say #=> (1, 2) | ||
t slice(2,-1), | t slice(2,-1) say #=> (2) | ||
t slice(-1,-1)) join(",") print | t slice(-1,-2) say #=> (1, 2) | ||
#=> (0, 1, 2),(1, 2),(0, 1),(2),(1),(0),(1),(1)nil |
|
||
t = (0="a", 1="b", 2="c") | |||
t slice say #=> (0=a, 2=c, 1=b) | |||
t slice((1,2,3)) keys sort(true) say #=> (1, 2) | |||
t slice(()) say #=> () | |||
#=> nil |