Mustang development is proudly sponsored by Cubox, Agile Rails Devshop
Mustang - V8 engine in Ruby's body
Before you install mustang gem make sure you have
$ sudo apt-get install scons # on debian $ sudo pacman -S scons # on archlinux $ brew install scons # on mac...
$ gem install mustang
$ git clone git://github.com/nu7hatch/mustang.git $ cd mustang $ rake compile $ rake install
require 'mustang' cxt = ::.new cxt.eval("'Hello' + ' World!';") # => 'Hello World!' cxt.eval("var a=1;") cxt.eval("a+5;") # => 6 cxt[:puts] = method(:puts) cxt.eval("puts(a)") # displays "1" on the screen cxt[:a] # => 1
Note on Patches/Pull Requests
- Fork the project.
- Make your feature addition or bug fix.
- Add tests for it. This is important so I don't break it in a future version unintentionally.
- Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
- Send me a pull request. Bonus points for topic branches.
Copyright (c) 2010 Kriss 'nu7hatch' Kowalik. See LICENSE for details.