summaryrefslogtreecommitdiff
path: root/ext/io
AgeCommit message (Collapse)Author
2016-07-06Update dependenciesnobu
* common.mk (compile.o, loadpath.o): update dependencies. * common.mk (vm_call.o): remove stale object dependencies. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-15io/console: bump upnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-15io/console: unknown key code for names with nulnobu
* ext/io/console/console.c (console_key_pressed_p): raise the same exception, "unknown virtual key code", for names with nul chars. though console_win32_vk() considers the length and can deal with nul chars, rb_sprintf() raised at PRIsVALUE previously, so quote it if it is unprintable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-15io/console: rb_sym2strnobu
* ext/io/console/console.c (rb_sym2str): fallback definition for older ruby. [ruby-core:74953] [Bug #12284] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-15io/console: use rb_funcallvnobu
* ext/io/console/console.c: use rb_funcallv instead of rb_funcall2, and define rb_funcallv if unavailable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-15io/console: fallback RARRAY_CONST_PTRnobu
* ext/io/console/console.c (RARRAY_CONST_PTR): fallback definition for older ruby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-15io/console: reject symbols with nul charnobu
* ext/io/console/console.c (console_key_pressed_p): symbol names can contain nul chars, reject them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-24wait readable/writablenobu
* ext/io/wait/wait.c (io_wait_readwrite): [EXPERIMENTAL] allow to wait for multiple modes, readable and writable, at once. the arguments may change in the future. [Feature #12013] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-23io/console: fix gem build failure on Windowsnobu
* ext/io/console/extconf.rb: fix gem build failure on Windows. only win32_vk.inc is included in the gem and no dependencies for the header, so that gperf will not be mandatory. [ruby-core:72453] [Bug #11866] * ext/io/console/io-console.gemspec: include depend file and win32_vk header. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-23prefer rb_syserr_failnobu
* file.c, io.c, util.c: prefer rb_syserr_fail with saved errno over setting errno then call rb_sys_fail, not to be clobbered potentially and to reduce thread local errno accesses. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-22io-console.gemspec: BSD-2-Clausenobu
* ext/io/console/io-console.gemspec: change the license to BSD-2-Clause since "ruby" is no longer valid license as gem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-22io-console.gemspec: bump upnobu
* ext/io/console/io-console.gemspec: bump up to 0.4.4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16handle ext/ as r53141naruse
g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&# frozen_string_literal: false\n");f.rewind;f.write s}}' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08retry IO#getpassnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08Revert r52902,r52903,r52910,r52911,r52937,r52939naruse
Reject IO::Console#getpass because it can't test portablly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-06console.c: prompt to stderrnobu
* ext/io/console/console.c (console_getpass): print prompt to stderr when reading from stdin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-06console.c: console_getpassnobu
* ext/io/console/console.c (console_getpass): add IO#getpass method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-07console.c: check unused argsnobu
* ext/io/console/console.c (console_set_winsize): unused arguments also should be nil or integers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-04ext: use RARRAY_CONST_PTRnobu
* ext/bigdecimal/bigdecimal.c: use RARRAY_CONST_PTR just fore reference instead of RARRAY_PTR, to keep the array WB-protected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-02win32_vk.inc: merge win32_vk.hnobu
* ext/io/console/win32_vk.inc: merge win32_vk.h not to be included in HDRS on other platforms than Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-27io/console/extconf.rb: fix typonobu
* ext/io/console/extconf.rb: fix typo, $nmake is "m" for MS, not "n". check sys/ioctl.h iff necessary for tty. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21console.c: undefined vknobu
* ext/io/console/console.c (console_key_pressed_p): raise undefined virtual key code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-13* ext/io/console/depend (.list.chksum): revert a part of r50859, becauseusa
it was not mentioned at its commit log and it caused a build error on Windows ($(MAKE) is already quoted). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-13* ext/bigdecimal/bigdecimal.gemspec: Fix require paths for released gem.hsbt
[fix GH-929] Patch by @voxik * ext/io/console/io-console.gemspec: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-13win32_vk.inc: suppress warningsnobu
* ext/io/console/depend (win32_vk.inc): use offsetof() to suppress warnings against cast from pointer to integer of different size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-18nonblock.c: just yield if the flag is not changednobu
* ext/io/nonblock/nonblock.c (io_nonblock_set): return whether nonblock flag was changed. * ext/io/nonblock/nonblock.c (rb_io_nonblock_block): nothing to restore but just yield unless nonblock flag is changed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-08extconf.rb: no nmake style VPATHnobu
* 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-08depend: no nmake style VPATHnobu
* 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-07checksum.rb: check the targetnobu
* 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-07win32_vk.inc: renamednobu
* 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-06io/console: win32_vk dependenciesnobu
* 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-05io/console: vk_header only on Windowsnobu
* 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-03console.c: pressed? on Windowsnobu
* 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-03console.c: cursor position on Windowsnobu
* 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-03console.c: IO#beepnobu
* 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-03console.c: remove old ifdefnobu
* 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-04-12wait.c: no EOFnobu
* 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-12wait.c: poll over nreadnobu
* 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-12wait.c: fix rdocnobu
* 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-12wait.c: wait_for_single_fdnobu
* 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-12wait.c: get_timeoutnobu
* 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-03-21console.c: winsize on Windowsnobu
* 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-01io/wait: fix return value for buffered readnormal
* 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-02-16console.c: use static IDsnobu
* 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-16console.c: avoid inadvertent pindownnobu
* 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-16console.c: fix typonobu
* 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
2014-12-25console.c: IO.console arguments passingnobu
* 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-25console.c: get rid of NameErrornobu
* 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-18io/console: checks for old versionsnobu
* 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-17io-console.gemspec: bump upnobu
* 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