Ruby C Extension Cheat Sheet


ATTENTION: This page is very out of date. It has not been updated since 2007, and will not be updated in the future.

I got tired of looking all over for call sequences (let alone proper documentation) for functions used for creating Ruby extensions written in C, so I’m making notes about some functions I have found useful in creating Rubygame (and some I just included for completeness). This list is by no means comprehensive! There’s a lot missing, which I either don’t use or didn’t feel like posting. I update this page sporadically.

Here are some decent references I use, and which provided the information I catalog on this page:

Testing Ruby objects

C types -> Ruby objects

Ruby objects -> C types

Wrapping C objects into Ruby objects (and back again)

Accessing Variables / Constants

Generally Useful Functions

Rubygame Helpers

These are reusable functions I created for convenience. They are part of Rubygame, not part of Ruby.


Comments


Comments are closed.