@@ -76,9 +76,7 @@ getattr(int fd, conmode *t)
76
76
#endif
77
77
78
78
static ID id_getc , id_console , id_close ;
79
- #if ENABLE_IO_GETPASS
80
79
static ID id_gets , id_chomp_bang ;
81
- #endif
82
80
83
81
#if defined HAVE_RUBY_FIBER_SCHEDULER_H
84
82
# include "ruby/fiber/scheduler.h"
@@ -1534,7 +1532,6 @@ io_getch(int argc, VALUE *argv, VALUE io)
1534
1532
return rb_funcallv (io , id_getc , argc , argv );
1535
1533
}
1536
1534
1537
- #if ENABLE_IO_GETPASS
1538
1535
static VALUE
1539
1536
puts_call (VALUE io )
1540
1537
{
@@ -1615,7 +1612,6 @@ io_getpass(int argc, VALUE *argv, VALUE io)
1615
1612
puts_call (io );
1616
1613
return str ;
1617
1614
}
1618
- #endif
1619
1615
1620
1616
/*
1621
1617
* IO console methods
@@ -1625,10 +1621,8 @@ Init_console(void)
1625
1621
{
1626
1622
#undef rb_intern
1627
1623
id_getc = rb_intern ("getc" );
1628
- #if ENABLE_IO_GETPASS
1629
1624
id_gets = rb_intern ("gets" );
1630
1625
id_chomp_bang = rb_intern ("chomp!" );
1631
- #endif
1632
1626
id_console = rb_intern ("console" );
1633
1627
id_close = rb_intern ("close" );
1634
1628
#define init_rawmode_opt_id (name ) \
@@ -1676,16 +1670,12 @@ InitVM_console(void)
1676
1670
rb_define_method (rb_cIO , "clear_screen" , console_clear_screen , 0 );
1677
1671
rb_define_method (rb_cIO , "pressed?" , console_key_pressed_p , 1 );
1678
1672
rb_define_method (rb_cIO , "check_winsize_changed" , console_check_winsize_changed , 0 );
1679
- #if ENABLE_IO_GETPASS
1680
1673
rb_define_method (rb_cIO , "getpass" , console_getpass , -1 );
1681
- #endif
1682
1674
rb_define_singleton_method (rb_cIO , "console" , console_dev , -1 );
1683
1675
{
1684
1676
VALUE mReadable = rb_define_module_under (rb_cIO , "generic_readable" );
1685
1677
rb_define_method (mReadable , "getch" , io_getch , -1 );
1686
- #if ENABLE_IO_GETPASS
1687
1678
rb_define_method (mReadable , "getpass" , io_getpass , -1 );
1688
- #endif
1689
1679
}
1690
1680
{
1691
1681
/* :stopdoc: */
0 commit comments