will extend Ruby syntax to allow ~n(...) symbols which will evaluate the interior expression as one number. This reduces the number of objects and instructions allocated for a given segment of Ruby, which can improve performance and memory.

Modifiers

Modifiers allow you to modify the source of the Ruby code before it is compiled by injecting themselves into the require chain through RubyVM::InstructionSequence::load_iseq. They can be any of the preconfigured modifiers built into Vernacular, or they can just be a plain ruby class that responds to the method modify(source) where source is a string of code. The method should returned the modified source.

RegexModifier

Regex modifiers take the same arguments as String#gsub. Either configure them with a string, as in:

ASTModifier

For access to and documentation on the ASTModifier, check out the vernacular-ast gem.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.