RosettaCodeData/Task/Generic-swap/Ruby/generic-swap-3.rb

6 lines
81 B
Ruby
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
x = 42
y = "string"
x, y = swap x, y
puts x # prints string
puts y # prints 42