Skip to content

Instantly share code, notes, and snippets.

@mbj
Created January 2, 2014 17:38
Show Gist options
  • Save mbj/8222925 to your computer and use it in GitHub Desktop.
Save mbj/8222925 to your computer and use it in GitHub Desktop.
multiple assignment AST in ruby
mbj@mbj ~/devel/mutant (master) % bundle exec ruby-parse -e 'a.foo, a[1], b[] = b, *c' <<<
(masgn
(mlhs
(send
(send nil :a) :foo=)
(send
(send nil :a) :[]=
(int 1))
(send
(send nil :b) :[]=))
(array
(send nil :b)
(splat
(send nil :c))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment