Skip to content

Instantly share code, notes, and snippets.

@andrew
Created March 17, 2013 12:13
Show Gist options
  • Save andrew/5181279 to your computer and use it in GitHub Desktop.
Save andrew/5181279 to your computer and use it in GitHub Desktop.
number = 1
string = "andrew"
hash = { "foo" => "bar" }
array = [1,3,2]
symbol = :cheese
range = 1..3
# try puts each variable above
puts string
def swap(argument1, argument2)
[argument2, argument1]
end
class Cheese < String
def reverse
'cheese'
end
end
cheese = Cheese.new('andrew')
cheese.reverse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment