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

167 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 214e2f93aa
Fix the warning in 456586bb23 2019-05-15 18:19:23 +09:00
Nobuyoshi Nakada 29dde62605
io/console: rb_str_cat_conv_enc_opts is not exported 2019-05-14 14:50:21 +09:00
Nobuyoshi Nakada c174670823
io/console: fix up timeout on Windows 2019-05-14 14:39:08 +09:00
Nobuyoshi Nakada 456586bb23
io/console: support getch timeout on Windows 2019-05-14 14:21:46 +09:00
Nobuyoshi Nakada 6d733565c2
io/console: support wide character input on Windows 2019-05-14 14:20:09 +09:00
nobu 63f990674b Use $(hdrdir) for include/ruby.h, as well as r67033
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-11 13:43:14 +00:00
nobu 384ca22a7a io-console.gemspec: update
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-27 04:21:53 +00:00
nobu d880245cbc io-console: bump to 0.4.7
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-25 03:24:31 +00:00
nobu 1de78c5fd8 io/console: drop 2.1.0 support [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-02 11:24:29 +00:00
nobu 013016b986 io/console: drop 2.0.0 support [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-02 07:53:27 +00:00
nobu 7c4306e6e9 gperf.sed: static declarations
* tool/gperf.sed: comment out arguments part only, to keep the
  following declarations static.  [Feature #13883]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15 14:42:43 +00:00
nobu a4804fbdf5 support gperf 3.1
* tool/gperf.sed: extracted sed commands to a script.  ANSI-C code
  produced by gperf 3.1 declares length arguments as `size_t`.  it
  causes conflict with existing declarations, and needs casts for
  a local variable and return statements.
  [Feature #13883]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-08 05:51:19 +00:00
knu b0c719dae4 Fix typos in rdoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-08 03:57:54 +00:00
knu f477851bb7 Add details on the min/time parameters to the rdoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-07 05:28:14 +00:00
mame f3a491d932 ext/io/console/lib/console/size.rb: Fix the context of method definition
`console_size` is not a instance method but a class method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-17 08:04:34 +00:00
hsbt 274c6180b7 To use github url for gemspec.
[Bug #13906][ruby-core:82817]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-15 23:46:46 +00:00
hsbt 4d5c414fcc Update gemspec for gem released versions.
* These are dbm, fcntl, io-console, sdbm, stringio, strscan, zlib,
    cmath, scanf.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14 02:01:36 +00:00
nobu 65b11a04f1 console.c: set winsize on Windows
* ext/io/console/console.c (console_set_winsize): retry shrinking
  window and screen buffer.  [ruby-core:82741] [Bug #13888]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-11 20:10:34 +00:00
mame 440dc6b7e0 Improve line covearge of ext/io/nonblock/nonblock.c from 54.5% to 95.5%
Not so good test, but it would be better than nothing, I guess...

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-04 13:25:01 +00:00
shyouhei 20c72dc89d ruby tool/update-deps --fix
Onigumo 6 (r57045) introduced new onigumo.h header file, which is
required from quite much everywhere.  This commit adds necessary
dependencies.

Note: ruby/oniguruma.h now includes onigumo.h,
      ruby/io.h includes oniguruma.h,
      ruby/encoding.h also includes oniguruma.h,
      and internal.h includes encoding.h.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-22 06:00:18 +00:00
nobu b4a55c1cad console.c: unpaired size
* ext/io/console/console.c (console_set_winsize): reject unpaired
  pixel size.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-07 23:02:29 +00:00
nobu 5b856ee1a6 console.c: OOB access
* ext/io/console/console.c (console_set_winsize): fix
  out-of-bounds access.  [ruby-core:79004] [Bug #13112]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-07 22:52:03 +00:00
kazu 07efce075b Use https instead of http in some URLs
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-11 10:33:36 +00:00
nobu 64fea27496 Update dependencies
* 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-07-06 05:48:13 +00:00
nobu 53d4862952 io/console: bump up
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-15 06:15:54 +00:00
nobu e78beed499 io/console: unknown key code for names with nul
* 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-15 01:07:14 +00:00
nobu 9816f87815 io/console: rb_sym2str
* 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-15 00:02:59 +00:00
nobu cc91082af8 io/console: use rb_funcallv
* 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-15 00:02:43 +00:00
nobu c88d0666d4 io/console: fallback RARRAY_CONST_PTR
* 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-15 00:02:42 +00:00
nobu 0177687124 io/console: reject symbols with nul char
* 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-04-15 00:02:41 +00:00
nobu b58fac9a97 wait readable/writable
* 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
2016-01-24 07:55:05 +00:00
nobu 12a2e17a34 io/console: fix gem build failure on Windows
* 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-23 15:26:08 +00:00
nobu f4166e2dd7 prefer rb_syserr_fail
* 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-23 08:57:48 +00:00
nobu 52c3b2eb2a io-console.gemspec: BSD-2-Clause
* 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-22 13:56:34 +00:00
nobu 3f90a4ae1e io-console.gemspec: bump up
* 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-22 13:15:11 +00:00
naruse c4fdfabcc8 handle ext/ as r53141
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-16 05:31:54 +00:00
nobu 8f620b9b17 retry IO#getpass
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 13:26:56 +00:00
naruse 958e153cdb Revert r52902,r52903,r52910,r52911,r52937,r52939
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-08 10:54:42 +00:00
nobu 1ad0d8ecad console.c: prompt to stderr
* 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-06 06:30:11 +00:00
nobu 187de9240a console.c: console_getpass
* 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-12-06 06:25:10 +00:00
nobu 9d0012b0e7 console.c: check unused args
* 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-07 00:25:50 +00:00
nobu 3553a86eb5 ext: use RARRAY_CONST_PTR
* 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-11-04 07:27:10 +00:00
nobu 71f2c19a9c win32_vk.inc: merge win32_vk.h
* 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-09-02 03:57:23 +00:00
nobu 0f6b7c4c3b io/console/extconf.rb: fix typo
* 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-27 02:21:13 +00:00
nobu 09389b47d2 console.c: undefined vk
* 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-07-21 10:52:19 +00:00
usa 9dcf6d9f96 * ext/io/console/depend (.list.chksum): revert a part of r50859, because
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 10:47:30 +00:00
hsbt 7c34b471be * ext/bigdecimal/bigdecimal.gemspec: Fix require paths for released gem.
[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-13 02:35:25 +00:00
nobu b031b3874b win32_vk.inc: suppress warnings
* 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-06-13 01:59:58 +00:00
nobu 0a933cf3d4 nonblock.c: just yield if the flag is not changed
* 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-18 10:30:36 +00:00
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