Граф коммитов

118 Коммитов

Автор SHA1 Сообщение Дата
nobu 596663589b extconf.rb: no nmake style VPATH
* ext/io/console/extconf.rb: only nmake needs remove  style VPATH.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-08 08:22:06 +00:00
nobu d75ba7dc3e depend: no nmake style VPATH
* ext/io/console/depend: remove nmake style VPATH, for normal makes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-08 08:05:45 +00:00
nobu 8869cdf576 checksum.rb: check the target
* tool/checksum.rb (Checksum#update?): check if the target exists
  too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-07 07:09:43 +00:00
nobu 19e0fa010e win32_vk.inc: renamed
* ext/io/console/win32_vk.inc: renamed not to be included in HDRS
  by mkmf.rb and regenerated unexpectedly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-07 06:35:40 +00:00
nobu 81c83f55e7 io/console: win32_vk dependencies
* ext/io/console/depend: check if VK table is modified by the
  checksum.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-06 21:54:07 +00:00
nobu c1e7d5f5bd io/console: vk_header only on Windows
* ext/io/console/extconf.rb: vk_header is used only on Windows,
  nonsense to update on other platforms.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-05 10:54:37 +00:00
nobu 11b97855c4 console.c: pressed? on Windows
* ext/io/console/console.c (console_key_pressed_p): new method
  IO#pressed? on Windows.  [EXPERIMENTAL]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-03 18:13:10 +00:00
nobu 85366d7d59 console.c: cursor position on Windows
* ext/io/console/console.c (console_goto): new method IO#goto on
  Windows.  [EXPERIMENTAL]

* ext/io/console/console.c (console_cursor_pos): new method
  IO#cursor on Windows.  [EXPERIMENTAL]

* ext/io/console/console.c (console_cursor_set): new method
  IO#cursor= on Windows.  [EXPERIMENTAL]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-03 18:11:40 +00:00
nobu 1014dfb442 console.c: IO#beep
* ext/io/console/console.c (console_beep): new method IO#beep.
  [EXPERIMENTAL]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-03 18:11:25 +00:00
nobu 3cfd6f9fcd console.c: remove old ifdef
* ext/io/console/console.c (LAST_ERROR): remove old ifdef, should
  use rb_w32_map_errno always.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-03 00:35:35 +00:00
nobu a60e00fde8 wait.c: no EOF
* ext/io/wait/wait.c (io_wait_readable): simply returns that IO is
  readable without blocking, but no longer returns EOF.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12 06:10:21 +00:00
nobu 1baa57b003 wait.c: poll over nread
* ext/io/wait/wait.c (io_ready_p, io_wait_readable): try polling
  first and check FIONREAD optionally to see if EOF.
  [ruby-core:36805] [Feature #4849]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12 06:08:39 +00:00
nobu a4f7274423 wait.c: fix rdoc
* ext/io/wait/wait.c (io_wait_writable): fix rdoc.  no EOF to
  write.  retursn nil when timeout, not self.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12 06:07:48 +00:00
nobu b850ec4680 wait.c: wait_for_single_fd
* ext/io/wait/wait.c (wait_for_single_fd): extract wrapper
  function of rb_wait_for_single_fd().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12 00:53:28 +00:00
nobu f7dca1d7cd wait.c: get_timeout
* ext/io/wait/wait.c (get_timeout): extract function to get
  timeout value.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12 00:24:12 +00:00
nobu add8e1f5bb console.c: winsize on Windows
* ext/io/console/console.c (console_set_winsize): use handle for
  writing.  GetConsoleScreenBufferInfo seems failing on a handle
  for reading.
* io.c: [DOC] update the example of IO#winsize to use $stdout
  instead of $stdin, which does not work on Windows.  a patch by
  Jan Lelis <mail AT janlelis.de> at [ruby-core:68574].
  [Bug #10986]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-21 06:01:29 +00:00
normal 26e1ebdc1e io/wait: fix return value for buffered read
* ext/io/wait/wait.c (io_nread): wrap return value with INT2FIX
  Thanks to Yura Sokolov <funny.falcon@gmail.com>
  [ruby-core:68369] [Bug#10923]
* test/io/wait/test_io_wait.rb (test_nread_buffered):
  fix broken test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-01 21:03:22 +00:00
nobu b1cff6b68c console.c: use static IDs
* ext/io/console/console.c (rawmode_opt): prepare static IDs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-16 03:43:20 +00:00
nobu 8a29d8bbde console.c: avoid inadvertent pindown
* ext/io/console/console.c (console_dev): call Kernel#__send__
  method to avoid inadvertent pindown.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-16 03:43:18 +00:00
nobu 5f9f15365f console.c: fix typo
* ext/io/console/console.c (console_dev): fix typo, should be
  rb_funcallv to call with an argument array.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-16 03:27:02 +00:00
nobu 945e4692ca console.c: IO.console arguments passing
* ext/io/console/console.c (console_dev): send the given arguments
  to the opened console.  as a special case, do nothing if :close
  is given.
* test/lib/leakchecker.rb (LeakChecker#check_fd_leak): close if
  console.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 07:14:12 +00:00
nobu d8d326c97a console.c: get rid of NameError
* ext/io/console/console.c (console_dev): id_console is not a
  constant name, use rb_const_remove() to get rid of NameError.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 01:09:17 +00:00
nobu 3bd4d51149 io/console: checks for old versions
* ext/io/console/extconf.rb: remove no longer needed checks for
  old versions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-18 02:44:56 +00:00
nobu c28e5f0852 io-console.gemspec: bump up
* ext/io/console/io-console.gemspec: bump up to 0.4.3.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-17 08:17:49 +00:00
nobu ee4ca1887a console.c: dead code
* ext/io/console/console.c: remove dead code for old versions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-17 08:17:46 +00:00
usa fd9f6bde95 * win32/win32.c, include/win32/win32.h (rb_w32_set_nonblock): new
function to support nonblock-mode of pipes.

* win32/win32.c (rb_w32_read): nonblock-mode pipe returns ERROR_NO_DATA
  if there is no data, but also returns it if remote-end is closed.

* win32/win32.c (rb_w32_write): if cannot to write any data, it may be
  blocking.

* io.c (rb_io_set_nonblock): use rb_w32_set_nonblock for Windows.

* ext/io/nonblock/nonblock.c (rb_io_nonblock_set): use ruby's API when
  setting nonblock-mode.

* test/ruby/test_io.rb: test nonblock pipes on Windows.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10 10:42:19 +00:00
nobu 28b9f11d5a protoize no-arguments functions
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-30 05:25:32 +00:00
usa 64904f51d7 * ext/io/console/console.c (console_dev): need read access for conout$
because some functions need it.  [Bug#9554]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-22 10:11:25 +00:00
nobu 2019f34bc9 io-console.gemspec: certification
* ext/io/console/io-console.gemspec: add a certification.
  http://www.benjaminfleischer.com/2013/11/08/how-to-sign-your-rubygem-cert/

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-13 08:08:09 +00:00
zzak 64afa78e8a * ext/io/nonblock/nonblock.c: [DOC] Document io/nonblock by reprah
[Fixes GH-418] https://github.com/ruby/ruby/pull/418 based on the
  original discussion from documenting-ruby/ruby#18


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-16 20:54:23 +00:00
zzak 8ead78806c * ext/io/nonblock/nonblock.c: use rb_cIO instead of VALUE
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-16 13:36:19 +00:00
nobu c59ba9ce81 io-console.gemspec: drop 1.9
* ext/io/console/io-console.gemspec: drop 1.9 support since
  rb_cloexec_open() is mandatory now.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-09 13:56:04 +00:00
charliesome ecab690862 * ext/io/console/console.c: delete redefinition of rb_cloexec_open.
This function is always defined by io.c and is declared as non-static
  in a header file, so this declaration causes a compilation error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-09 10:18:56 +00:00
nobu 755f669316 io/console: rdoc
* ext/io/console/console.c (io_getch): add rdoc.

* ext/io/console/lib/console/size.rb (IO.console_size): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-24 06:54:25 +00:00
nobu db41a18845 rename generic io modules
* ext/io/console/console.c, ext/stringio/stringio.c: rename internally
  used modules as generic_readable and generic_writable.  [Fix GH-315]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-24 06:54:17 +00:00
zzak 3a7a773aeb * ext/socket/option.c: Document synonymous methods, by windwiny [GH-277]
* ext/stringio/stringio.c: ditto
* ext/io/wait/wait.c: ditto
* ext/gdbm/gdbm.c: ditto
* ext/dl/cfunc.c: ditto
* ext/zlib/zlib.c: ditto
* ext/win32ole/win32ole.c: ditto
* ext/dbm/dbm.c: ditto
* ext/json/generator/generator.c: ditto
* ext/date/date_core.c: ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-16 03:25:50 +00:00
akr 788b45da3e * ext/-test-/debug/depend: New file.
* ext/-test-/exception/depend: Ditto.

* ext/-test-/printf/depend: Ditto.

* ext/-test-/string/depend: Ditto.

* ext/coverage/depend: Ditto.

* ext/io/console/depend: Ditto.

* ext/io/nonblock/depend: Ditto.

* ext/io/wait/depend: Ditto.

* ext/openssl/depend: Ditto.

* ext/pathname/depend: Ditto.

* ext/psych/depend: Ditto.

* ext/zlib/depend: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-14 10:48:08 +00:00
nobu 4002be60c0 console.c: supppress warnings
* ext/io/console/console.c (console_iflush, console_oflush): supppress
  unused-but-set-variable warnings on no tcflush.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-16 08:05:45 +00:00
nobu 78b50f26dc io/console: 0.4.2
* ext/io/console/io-console.gemspec: bump to 0.4.2.  now explicitly
  requires ruby 1.9.3 or later.  [Bug #7847]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-16 04:13:07 +00:00
nobu 923b8c4eda io/console: set HAVE_RB_SCAN_ARGS_OPTIONAL_HASH
* ext/io/console/extconf.rb: obtain optional hash by rb_scan_args() by
  default right now.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-16 04:00:33 +00:00
nobu 2a62ca666c io/console: fix configuration failure
* ext/io/console/extconf.rb: fix configuration failure by missing
  cpp_include.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-16 03:58:04 +00:00
nobu 6ba2001d72 io/console: compatibility with 1.8
* ext/io/console/console.c (console_dev): compatibility with ruby 1.8.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-16 03:47:21 +00:00
nobu 44c24d4416 io/console: compatibility with 1.9
* ext/io/console/console.c (rawmode_opt, console_dev): compatibility
  with ruby 1.9.  [ruby-core:52220] [Bug #7847]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-16 03:46:34 +00:00
nobu 490f1fc009 console.c: default by stty raw
* ext/io/console/console.c (rawmode_opt): use default values by `stty
  raw`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05 04:27:57 +00:00
nobu d06141cde7 io-console.gemspec: 0.4.1
* ext/io/console/io-console.gemspec: bump to 0.4.1.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-04 12:23:51 +00:00
nobu 1a15c3770e io-console.gemspec: limit date length
* ext/io/console/io-console.gemspec: limit Date keyword length to get rid of locale format.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-04 12:15:32 +00:00
nobu 36ed400fe3 io-console.gemspec: update
* ext/io/console/io-console.gemspec: use Date keyword and add licenses.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-04 12:09:16 +00:00
nobu 523292d612 console.c: initialize
* ext/io/console/console.c (rawmode_opt): initialize options for the
  case all options are not given.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-04 06:10:12 +00:00
nobu 80455c0d97 * ext/io/console/io-console.gemspec: fix date.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-03 08:22:43 +00:00
nobu b3d12956b4 io-console.gemspec: bump
* ext/io/console/io-console.gemspec: bump.  [Bug #7762]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-03 07:54:29 +00:00