Skip to content

Instantly share code, notes, and snippets.

@jadon1979
Created January 16, 2013 15:56
Show Gist options
  • Select an option

  • Save jadon1979/4548243 to your computer and use it in GitHub Desktop.

Select an option

Save jadon1979/4548243 to your computer and use it in GitHub Desktop.
splat n tap
def blah(x, *y, z)
return x, y, z
end
a = blah 1, 'A', 'B', 'C', 'X', 'Y', 'Z', "*"
p a
a.tap { |b| b[1].reverse! }
p a
b = blah 1, 10
p b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment