Skip to content

Instantly share code, notes, and snippets.

@scolon7251
Created March 20, 2014 00:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scolon7251/9654680 to your computer and use it in GitHub Desktop.
Save scolon7251/9654680 to your computer and use it in GitHub Desktop.
syntax error
require_relative "stacklike"
class Stack
include Stacklike
end
module Stacklike
def stack
@stack || = []
end
def add_to_stack(obj)
stack.push(obj)
end
def take_from_stack
stack.pop
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment