Created
July 14, 2017 22:08
-
-
Save kenichi/7ab9c19f4cdca0cd80e1e361d9a93c9f to your computer and use it in GitHub Desktop.
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
def bam(*a, baz:, bat:, **h, &block) | |
[*a, block.parameters, baz: baz, bat: bat, **h] | |
end | |
__END__ | |
> bam 1, 2, 'a', 'b' => 'c', d: 0xe, baz: 'mno', bat: 'jkl' do |*ar, foo:, **hash|; end | |
=> [1, 2, "a", {"b"=>"c"}, [[:rest, :ar], [:keyreq, :foo], [:keyrest, :hash]], {:baz=>"mno", :bat=>"jkl", :d=>14}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment