Skip to content

Instantly share code, notes, and snippets.

@practicingruby
Created November 15, 2011 19:55
Show Gist options
  • Select an option

  • Save practicingruby/1368124 to your computer and use it in GitHub Desktop.

Select an option

Save practicingruby/1368124 to your computer and use it in GitHub Desktop.
it "implements ROT" do
execute %w[
:foo
:bar
:baz
:foobar
:quux
ROT
]
# ROT takes the third element on the stack and places it on the
# top of the stack, pushing the first and second element downwards
interpreter.stack.must_equal([:foo,:bar,:foobar, :quux, :baz])
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment