Skip to content

Instantly share code, notes, and snippets.

@marshall-lee
Last active May 18, 2017 06:15
Show Gist options
  • Select an option

  • Save marshall-lee/972c2e65cb1f8e2c2daa8e97c42abe5c to your computer and use it in GitHub Desktop.

Select an option

Save marshall-lee/972c2e65cb1f8e2c2daa8e97c42abe5c to your computer and use it in GitHub Desktop.
class FakeHash
def to_hash
{ a: 1, b: 2, c: 3 }
end
end
class FakeArray
def to_a
[1, 2, 3]
end
end
def wow(*args)
args
end
p wow(*FakeArray.new, 4, 5, 6, **FakeHash.new, d: 4, e: 5, f: 6)
# [1, 2, 3, 4, 5, 6, {:a=>1, :b=>2, :c=>3, :d=>4, :e=>5, :f=>6}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment