rubinius/rubinius — pull request #1258 by larskanis (2011-10-15 11:33:54+00:00)
Title: C++ compatible capi/st.h and proper specs for it

Recently I tried to use fxruby together with rubinius. Some changes were necessary at fxruby side and one at the rubinius side to get it working.

Since fxruby is a C++ extension, all ruby headers are included per extern "C". The hash table functions of MRI-ruby are not compiled into rubinius, but are defined as static functions in capi/st.h. So they has to be C++ compatible for use in C++ extensions. This is what the attached patch is for.

There were no tests for capi/st.h before, so I added the typical use cases in a spec. I've separated the changes into single commits, because I'm not completely sure, if all this is the way you want to go.

Regards,
Lars