summaryrefslogtreecommitdiff
path: root/ext/-test-/win32
diff options
context:
space:
mode:
Diffstat (limited to 'ext/-test-/win32')
-rw-r--r--ext/-test-/win32/console/attribute.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/-test-/win32/console/attribute.c b/ext/-test-/win32/console/attribute.c
index a5f80fc..e3e80a1 100644
--- a/ext/-test-/win32/console/attribute.c
+++ b/ext/-test-/win32/console/attribute.c
@@ -13,7 +13,7 @@ io_handle(VALUE io)
}
static VALUE
-console_info(VALUE io)
+console_info(VALUE klass, VALUE io)
{
HANDLE h = io_handle(io);
CONSOLE_SCREEN_BUFFER_INFO csbi;
@@ -29,7 +29,7 @@ console_info(VALUE io)
}
static VALUE
-console_set_attribute(VALUE io, VALUE attr)
+console_set_attribute(VALUE klass, VALUE io, VALUE attr)
{
HANDLE h = io_handle(io);
@@ -47,8 +47,8 @@ Init_attribute(VALUE m)
"size_x", "size_y",
"cur_x", "cur_y",
"attr", NULL);
- rb_define_method(rb_cIO, "console_info", console_info, 0);
- rb_define_method(rb_cIO, "console_attribute", console_set_attribute, 1);
+ rb_define_singleton_method(m, "console_info", console_info, 1);
+ rb_define_singleton_method(m, "console_attribute", console_set_attribute, 2);
rb_define_const(m, "FOREGROUND_MASK", INT2FIX(FOREGROUND_MASK));
rb_define_const(m, "FOREGROUND_BLUE", INT2FIX(FOREGROUND_BLUE));