A library functions that behave more or less like their Ruby counterparts.
The unit tests have all their expected outputs generated by calls to the Ruby methods that the C functions are based on so that whatever value you'd get in Ruby you should also get with these C functions.
Uses the Better String Library internally.
Doxygen API docs here.
Clone the repository.
$ git clone https://github.com/mooreryan/ruby_like_c.git
Make some dirs.
$ cd ruby_like_c && mkdir bin test/support
$ gem install ceedling
ceedling to run the unit tests. It's snazzy.
Most of the unit tests are based on those for the Ruby source code, e.g., these.
Because we want the functions to give the same values as their Ruby counterparts, some of the tests files should generated automatically like so:
$ ruby scripts/generate_tests.rb
This should dump some files in the
Then you can run the test suite with the