Skip to content

Instantly share code, notes, and snippets.

@hooopo
Created November 27, 2009 00:53
Show Gist options
  • Save hooopo/243753 to your computer and use it in GitHub Desktop.
Save hooopo/243753 to your computer and use it in GitHub Desktop.
class Stack
def initialize
@store = []
end
def push(x)
@store.push x
end
def pop
@store.pop
end
def peek
@store.last
end
def empty?
@store.empty?
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment