Created
February 25, 2011 09:49
-
-
Save dchentech/843595 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Makefile | |
*bundle | |
*o |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'mkmf' | |
extension_name = 'MacRuby' | |
dir_config(extension_name) | |
create_makefile(extension_name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ruby.h" | |
VALUE MacRuby = Qnil; | |
void Init_MacRuby(); | |
VALUE version(VALUE self); | |
void Init_MacRuby() { | |
MacRuby = rb_define_class("MacRuby", rb_cObject); | |
rb_define_singleton_method(MacRuby, "version", version, 0); | |
} | |
VALUE version(VALUE self) { | |
return INT2NUM(1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment