Created
April 5, 2009 03:25
-
-
Save patrickt/90361 to your computer and use it in GitHub Desktop.
This file contains 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
rb_io_s_open(VALUE klass, SEL sel, int argc, VALUE *argv) | |
{ | |
printf("Beginning the opening lol."); | |
VALUE io = rb_io_s_new(klass, sel, argc, argv); | |
if (rb_block_given_p()) { | |
VALUE ret = rb_vm_yield(1, &io); | |
rb_io_close_m(io, 0); | |
return ret; | |
} | |
return io; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment