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

194 Коммитов

Автор SHA1 Сообщение Дата
stomar 08d01949bf readline.c: improve docs
* ext/readline/readline.c: [DOC] fix typo in docs for
  Readline.completion_quote_character; enable link to method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-12 20:37:30 +00:00
nobu 7f24188afe Added missing declarations in readline.h bundled with macOS 10.14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-07 09:17:59 +00:00
nobu 074f1c9133 Readline: expose rl_completion_quote_character variable
[Feature #13050]

From: georgebrock (George Brocklehurst) <ruby@georgebrock.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-02 23:27:08 +00:00
k0kubun 5bd4283f77 ext/readline/extconf.rb: try using more readline APIs
on MinGW.

[Bug #15020]

From: MSP-Greg <Greg.mpls@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-24 10:25:51 +00:00
kazu 14892a26a5 use https:// instead of http://
[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-28 10:00:27 +00:00
nobu 97e05dad7f UNREACHABLE_RETURN
* include/ruby/ruby.h (UNREACHABLE_RETURN): UNREACHABLE at the end
  of non-void functions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-24 05:38:07 +00:00
nobu c8094ff154 no ID cache in Init functions
Init functions are called only once, cache is useless.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-16 08:39:48 +00:00
nobu f36688449b ignore external library sources [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-26 03:13:33 +00:00
nobu 1852b4a866 ext: check if null byte is contained
[ruby-dev:50267] [Bug #13953]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-30 08:35:23 +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
hsbt 48240306b1 Fix up r57788, Function is removed at readline-6.3.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-07 04:46:46 +00:00
hsbt cf2a68662a Avoid to warning of clang with -Wincompatible-pointer-types.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-06 09:10:21 +00:00
nobu f96c171ebc readline.c: fix waiting fucntion
* ext/readline/readline.c (getc_body): use
  rb_w32_wait_events_blocking in block region.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-06 08:10:20 +00:00
nobu 1ec805727e readline.c: fix type
* ext/readline/readline.c (getc_body): fix variable type, and
  extract _get_osfhandle.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-04 05:13:18 +00:00
nobu d3d9903dc2 readline.c: str_subpos
* ext/readline/readline.c (str_subpos): make string instance only
  if necessary.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-17 11:52:11 +00:00
nobu 48d5a921ab readline: remove dependency on internal.h
* ext/readline/depend: remove dependency on internal.h.

* ext/readline/readline.c (readline_s_delete_text): use
  rb_enc_str_new_static instead of rb_setup_fake_str not to depend
  on internal.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-13 02:11:07 +00:00
hsbt 631f8da938 * ext/readline/extconf.rb: Update error message with correct words.
[fix GH-1453][ci skip] Patch by @magikid

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-06 02:38:18 +00:00
nobu 011e45c6ec use rb_locale_str_new
* ext/readline/readline.c (readline_char_is_quoted): use
  rb_locale_str_new with the length.  [Feature #12659]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-03 12:39:10 +00:00
nobu 402f042689 rl_char_is_quoted_p
* ext/readline/readline.c (readline_s_set_quoting_detection_proc):
  support rl_char_is_quoted_p.  [Feature #12659]
* ext/readline/readline.c (readline_s_get_quoting_detection_proc):
  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-03 08:20:07 +00:00
nobu 5d8acb25a7 readline.c: mustbe_callable
* ext/readline/readline.c (mustbe_callable): extract to check a
  given argument to be callable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-03 07:10:49 +00:00
akr 9d8ef4ea20 Update dependencies.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-11 11:50:00 +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
naruse 6db72c0166 * ext/readline/extconf.rb: call dir_config("libedit")
if --enable-libedit is spcified. [Bug #11751]
  patched by John Hein

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30 09:48:24 +00:00
nobu 57e2877e7b ext: use RARRAY_AREF
* ext/**/*.c: prefer RARRAY_AREF to indexing RARRAY_CONST_PTR.
  pointed out by hanmac.
  https://github.com/ruby/ruby/commit/3553a86#commitcomment-14187670

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-05 01:09:17 +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 ee750a8a8b pass saved errno
* ext/socket/socket.c (socket_s_ip_address_list): pass saved errno
  to rb_syserr_fail.

* ext/readline/readline.c (readline_getc, readline_s_set_input),
  (readline_s_set_output): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-08 05:05:12 +00:00
nobu 095886b572 readline.c: initialize before rl_refresh_line
* ext/readline/readline.c (readline_s_refresh_line): initialize
  before rl_refresh_line(), as some function make the internal
  state non-clean but rl_refresh_line() does not re-initialize it.
  [ruby-core:43957] [Bug #6232]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-14 06:43:50 +00:00
akr ecedd3b224 Update dependencies.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-19 13:34:54 +00:00
akr 6ca202fcee Update dependency.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-21 03:04:44 +00:00
akr 7cd76ab0c5 * internal.h: Include ruby.h and ruby/encoding.h to be
includable without prior inclusion.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 11:49:06 +00:00
akr dd547e1b22 Mark auogenerated part.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 11:14:08 +00:00
akr 57682b05e1 * common.mk: Remove comments in Dependency lines.
Notified by usa.

* enc/depend: Ditto.

* ext/**/depend: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 10:28:25 +00:00
akr 8727eb77be * tool/update-deps: Extend to fix dependencies.
* common.mk: Dependencies updated by tool/update-deps.

* enc/depend: Ditto.

* ext/**/depend: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 05:15:49 +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
nobu 24b03b32e4 readline.c: use rb_setup_fake_str
* ext/readline/readline.c (readline_s_delete_text): initialize a
  fake string by rb_setup_fake_str().

* internal.h (rb_setup_fake_str): allow extensions to call.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-12 13:11:13 +00:00
nobu d2a8e28597 readline/extconf.rb: rl_hook_func_t
* ext/readline/extconf.rb (rl_hook_func_t): check pointer type.
  [ruby-dev:48089] [Bug #9702]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-04 15:31:23 +00:00
nobu 6648136779 readline/extconf.rb: fix typo
* ext/readline/extconf.rb: fix typo, `$defs` not `$DEFS`.
  [ruby-core:61756] [Bug #9578]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-31 14:57:47 +00:00
akr 083bf23759 A comment added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-02 06:22:27 +00:00
nobu 2bb8811484 extconf.rb: rl_hook_func_t for old readline
* ext/readline/extconf.rb (rl_hook_func_t): define as Function for
  very old readline versions.  [ruby-core:61209] [Bug #9578]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-02 02:13:41 +00:00
akr ed6a2d3bf6 * ext/readline/readline.c (Init_readline): Use rl_hook_func_t instead
of Function to support readline-6.3.  (rl_hook_func_t is available
  since readline-4.2.)
  Reported by Dmitry Medvinsky.  [ruby-core:61141] [Bug #9578]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-01 07:19:08 +00:00
akr a69756de67 * ext/readline/readline.c (readline_getc): Consider
NULL as input.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29 03:09:00 +00:00
akr 674f14a0bc * common.mk, ext/objspace/depend, ext/coverage/depend,
ext/-test-/debug/depend, ext/date/depend: Update dependencies.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-28 03:43:17 +00:00
akr d5dad14041 * ext/readline/readline.c: Include ruby/thread.h for
rb_thread_call_without_gvl2.
  (readline_rl_instream, readline_rl_outstream): Record FILE
  structures allocated by this extension.
  (getc_body): New function extracted from readline_getc.
  (getc_func): New function.
  (readline_getc): Use rb_thread_call_without_gvl2 to invoke getc_func.
  [ruby-dev:47033] [Bug #8749]
  (clear_rl_instream, clear_rl_outstream): Close FILE structure
  allocated by this extention reliably.  [ruby-core:57951] [Bug #9040]
  (readline_readline): Use clear_rl_instream and clear_rl_outstream.
  (readline_s_set_input): Set readline_rl_instream.
  (readline_s_set_output): Set readline_rl_outstream.
  (Init_readline): Don't call readline_s_set_input because
  readline_getc doesn't block other threads for any FILE structure now.

  [ruby-dev:47033] [Bug #8749] reported by Nobuhiro IMAI.
  [ruby-core:57951] [Bug #9040] reporeted by Eamonn Webster.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-27 12:04:14 +00:00
ktsj 00b8bd5c87 * error.c, object.c, ext/readline/README.ja: [DOC] $SAFE=4 is obsolete.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-18 10:36:54 +00:00
naruse 4852e7e673 fix r42527 again; [Bug #8760] [ruby-dev:47608] [ruby-dev:47609]
Remove check rl_instream != ifp->stdio_file.
rl_instream is made from duped fd and we cannnot compare.
This fix seems still buggy when rl_instream is manually changed from
other extension libraries.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-12 02:25:49 +00:00
naruse 0e2a3cccf6 refix r42525 set stdio_file only if stdio
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-12 01:04:01 +00:00
naruse 874dc2562d * ext/readline/readline.c (readline_s_set_input): on OS X with editline,
Readline.readline doesn't work because readline_get doesn't use
  rl_getc. The difference is introduced by r42402 [ruby-dev:47509]
  [Bug #8644]. Before it rb_io_stdio_file set ifp->stdio_file.
  Therefore add manually setting the value.

* ext/readline/readline.c (readline_s_set_onput): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-11 17:58:07 +00:00
ktsj eca115c34b * ext/readline/readline.c (insert_ignore_escape): suppress
logical-op-parentheses warning.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-09 15:27:41 +00:00
kouji ead6b6e721 * ext/readline/readline.c (readline_s_delete_text): remove
checking "$SAFE == 4".

* ext/readline/readline.c: fix rdoc, remove "Raises SecurityError"
  and add "Raises NotImplementedError".

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06 13:19:19 +00:00
kouji 19efdcee1e * ext/readline/readline.c, test/readline/test_readline.rb: fix
indent.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06 13:07:25 +00:00