Skip to content

Commit

Permalink
* console.c (InitVM_console): split.
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Apr 1, 2010
1 parent 52a779b commit a51e83f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions console.c
Expand Up @@ -77,6 +77,10 @@ getattr(int fd, conmode *t)
#define SET_LAST_ERROR (0)
#endif

#ifndef InitVM
#define InitVM(ext) {void InitVM_##ext(void);InitVM_##ext();}
#endif

static ID id_getc, id_console;

static void
Expand Down Expand Up @@ -509,6 +513,12 @@ Init_console(void)
{
id_getc = rb_intern("getc");
id_console = rb_intern("console");
InitVM(console);
}

void
InitVM_console(void)
{
rb_define_method(rb_cIO, "raw", console_raw, 0);
rb_define_method(rb_cIO, "getch", console_getch, 0);
rb_define_method(rb_cIO, "echo=", console_set_echo, 1);
Expand Down
2 changes: 1 addition & 1 deletion io-console.gemspec
@@ -1,7 +1,7 @@
# -*- ruby -*-
Gem::Specification.new do |s|
s.name = "io-console"
s.version = "0.2.1"
s.version = "0.2.2"
s.date = "2010-04-02"
s.summary = "Console interface"
s.email = "nobu@ruby-lang.org"
Expand Down

0 comments on commit a51e83f

Please sign in to comment.