Permalink
Browse files

readme update

  • Loading branch information...
1 parent a742e3a commit ce4a3d14a2c2ef9a8c1723d7f3dd5e8f0cdc523c @jmettraux committed Feb 4, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 README.md
View
9 README.md
@@ -3,9 +3,13 @@
Subaltern is a Ruby self-interpreter. It's sub-functional, it's a subaltern.
+Meant to interpret sandboxed ruby code.
+
## usage
+Innocent code:
+
require 'subaltern'
Subaltern.eval('1 + 1')
@@ -15,6 +19,11 @@ Subaltern is a Ruby self-interpreter. It's sub-functional, it's a subaltern.
c.eval('a + 2')
# => 9
+Bad code:
+
+ Subaltern.eval("''.eval('1 + 1')")
+ # => raises a Subaltern::NonWhitelistedMethodError
+
## issues

0 comments on commit ce4a3d1

Please sign in to comment.