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

7984 Коммитов

Автор SHA1 Сообщение Дата
Jeremy Evans 0dcd3340fb
[ruby/forwardable] Make def_*_delegator return name of method defined (Fixes #10)
This restores compatibility with previous versions.  This behavior
was previously undefined, but it makes sense for the name of the
defined method to be returned.

https://github.com/ruby/forwardable/commit/a52ef3451e
2019-12-11 20:23:53 +09:00
aycabta 6a7af800db Add a message for CompatibilityError 2019-12-11 11:36:40 +09:00
aycabta ec54ac9381 Support Readline.completion_quote_character by Reline 2019-12-11 11:13:05 +09:00
Hiroshi SHIBATA 95f570d0d3 [ruby/logger] bump version to 1.4.2
https://github.com/ruby/logger/commit/d6c01cc652
2019-12-10 21:03:36 +09:00
Jeremy Evans 7a1c56f978 [ruby/logger] Document that shift_age of 0 disables log file rotation
Fixes Ruby Bug 16349.

https://github.com/ruby/logger/commit/b1b6d06f2d
2019-12-10 20:59:36 +09:00
Jeremy Evans 38722fa179 [ruby/logger] Raise ArgumentError for invalid shift_age
Consider 'now' and 'everytime' as valid values for the previous
behavior of rotating everytime.

Fixes Ruby Bug 15977

https://github.com/ruby/logger/commit/f92979a376
2019-12-10 20:59:02 +09:00
George Claghorn eb18cb3e47 [ruby/logger] Honor Logger#level overrides
https://github.com/ruby/logger/commit/7365c995bf
2019-12-10 20:58:25 +09:00
NARUSE, Yui af11efd377 fix ipaddr parameter of Net::HTTP.start to support proxy
54072e329c
2019-12-10 19:12:21 +09:00
aycabta fe0df7dcfc Change encoding of completion strings 2019-12-10 17:28:09 +09:00
Hiroshi SHIBATA e27d2013db
Import racc-1.4.1 from ruby/racc. 2019-12-10 17:04:03 +09:00
Konstantin Papkovskiy 1bdabaa6b1 base64.rb: improve performance of Base64.urlsafe_encode64
* lib/base64.rb: avoid unnecessary memory allocations
2019-12-10 14:32:35 +09:00
Yusuke Endoh 3ca3c8d768 lib/net/http.rb: align the indentation 2019-12-10 14:15:35 +09:00
Kazuhiro NISHIYAMA 7be550d046
Stop Thread.new in `DRb::TimerIdConv::TimerHolder2#on_gc`
and add more stop_pool after stop_service
2019-12-10 12:43:49 +09:00
aycabta 6a22b2a091 Support completion with case-insensitive fashion
Reline performs completion in a case-insensitive fashon if
Readline.completion_case_fold or completion-ignore-case of .inputrc are set
"on".
2019-12-10 07:07:43 +09:00
NARUSE, Yui c2dc27d643 fix typo of 54072e329c 2019-12-09 20:48:35 +09:00
NARUSE, Yui 54072e329c Add ipaddr optional parameter to Net::HTTP#start
to replace the address for TCP/IP connection [Feature #5180]

There're 3 layers of hostname:
* host address for TCP/IP
* TLS server name
* HTTP Host header value
To test DNS round robin or check server certificate from server local,
people sometimes want to connect server with given IP address but keep
TLS server name and HTTP Host header value.

closes [Feature #15215]
closes https://github.com/ruby/ruby/pull/1893
closes https://github.com/ruby/ruby/pull/1977
2019-12-09 20:21:49 +09:00
Hiroshi SHIBATA 4b36832ba6
Merge the upstream changes for test-unit on ruby/logger.
This commits are based with:
    f067f7d1aa
    86058f420d
    02db6e8ed8
2019-12-09 19:17:32 +09:00
sonots ff7cc0dc34
[ruby/logger] 1.4.1
https://github.com/ruby/logger/commit/5987f518d1
2019-12-09 19:17:32 +09:00
Hiroshi SHIBATA 895f86c81b
[ruby/logger] Fixes #38
https://github.com/ruby/logger/commit/31efbb29ff
2019-12-09 19:17:31 +09:00
sonots 0fe1b05082
[ruby/logger] 1.4.0
https://github.com/ruby/logger/commit/8127ce0b56
2019-12-09 19:17:31 +09:00
Akira Matsuda 6158e28f8d
[ruby/logger] Avoid creating [] and "" when logging an Exception that has no backtrace
https://github.com/ruby/logger/commit/75fd308053
2019-12-09 19:17:31 +09:00
sonots 0aafc32995
[ruby/logger] frozen_string_literal: true
https://github.com/ruby/logger/commit/a057eede7b
2019-12-09 19:17:31 +09:00
Alan Wu 22548195d5
[ruby/logger] Fix typo
https://github.com/ruby/logger/commit/5f70168ac5
2019-12-09 19:17:31 +09:00
aycabta a14c01441b Fix encoding compatibility checking of completion correctly 2019-12-09 14:21:20 +09:00
aycabta 0ff84eda4e [ruby/irb] Version 1.2.0
https://github.com/ruby/irb/commit/da6577a88c
2019-12-07 21:56:23 +09:00
aycabta 2e595c2d78 [ruby/irb] New IRB needs Ruby 2.5 or later
https://github.com/ruby/irb/commit/4be3158358
2019-12-07 21:56:06 +09:00
aycabta ad6837dd60 [ruby/irb] Revert "Reidline mode needs Reline what needs String#grapheme_clusters"
This reverts commit 2b0b19b87c60d2cdb329979acbb96e12a1f940e7.

New IRB parser needs new Ripper what has lex_state too. The new Ripper is
adopted by Ruby 2.5 or later.

https://github.com/ruby/irb/commit/9ab6e35a2c
2019-12-07 21:55:31 +09:00
aycabta c2afddccb3 [ruby/irb] Reidline mode needs Reline what needs String#grapheme_clusters
https://github.com/ruby/irb/commit/2b0b19b87c
2019-12-07 20:01:53 +09:00
aycabta e72ffc55ba [ruby/reline] Support Ruby 2.5 or later for String#grapheme_clusters
https://github.com/ruby/reline/commit/33e8c8f15b
2019-12-07 20:01:53 +09:00
Kazuhiro NISHIYAMA 173b864668
Do not start thread when `require 'drb/drb'` only 2019-12-06 00:12:58 +09:00
Yusuke Endoh d43b9eb22d lib/drb/drb.rb: suppress warning: instance variable @pool_proxy not initialized 2019-12-05 22:37:08 +09:00
Kazuhiro NISHIYAMA 4c88107c54
Fix `warning: already initialized constant DidYouMean::VERSION`
```
.../gems/did_you_mean-1.3.1/lib/did_you_mean/version.rb:2: warning: already initialized constant DidYouMean::VERSION
.../lib/did_you_mean/version.rb:2: warning: previous definition of VERSION was here
```
2019-12-05 18:18:55 +09:00
Antonio Terceiro ed5d032ea3 debug.rb: expand filenames in breakpoints
When debugging some local code, specifying a breakpoint to a local
filename does not work, i.e.

    break lib/foo.rb:10

Expanding the filename makes it work. FWIW byebug has the same behavior.
2019-12-05 13:28:34 +09:00
Yuki Nishijima 18d3b5a93a Do not attempt to call methods on the receiver if it is a basic object 2019-12-04 19:55:01 -05:00
aycabta e3587ed849 Support disable-completion 2019-12-05 09:02:23 +09:00
aycabta ad8fbf444a Fix variable catch 2019-12-05 09:02:23 +09:00
Kazuhiro NISHIYAMA a0bc0e1ba1 Fix thread leak in drb 2019-12-04 20:57:24 +09:00
aycabta 027e847cd2 Fix auto-indent behavior correctly 2019-12-03 13:02:50 +09:00
aycabta a92560132b Support incremental search by last determined word
In the incremental search by C-r, search word is saved when it's determined. In
the next incremental search by C-r, if a user presses C-r again with the empty
search word, the determined previous search word is used to search.
2019-12-03 01:39:59 +09:00
aycabta bce38f706e The C-r in vi command mode is also incremental search 2019-12-03 01:39:59 +09:00
aycabta 103b04128f Support incremental search again by C-r in incremental search 2019-12-02 04:18:22 +09:00
aycabta c7f05310a2 Process Backspace key in incremental search correctly 2019-12-02 03:30:38 +09:00
aycabta e15b0313a7 Search history to back in the middle of histories 2019-12-02 03:09:41 +09:00
aycabta 8cb3f29abf The ed_search_prev_history should always search to backward 2019-12-01 23:54:57 +09:00
aycabta f1cfc7da18 Reline::HISTORY can take Range object 2019-12-01 23:54:57 +09:00
Kevin Deisz 171803d5d3 Promote did_you_mean to default gem
At the moment, there are some problems with regard to bundler + did_you_mean because of did_you_mean being a bundled gem. Since the vendored version of thor inside bundler and ruby itself explicitly requires did_you_mean, it can become difficult to load it when using Bundler.setup. See this issue: https://github.com/yuki24/did_you_mean/issues/117#issuecomment-482733159 for more details.
2019-11-30 21:08:19 -05:00
Hiroshi SHIBATA 08c866d528 [ruby/fileutils] Bump version to 1.4.1
https://github.com/ruby/fileutils/commit/da15e3ce06
2019-11-30 18:09:41 +09:00
Hiroshi SHIBATA 32e547954f
Revert "[ruby/fileutils] Fix #install with "X" mode option"
This reverts commit eab88d20ea.

  The some CI was broken with this.
2019-11-30 17:58:39 +09:00
Jeremy Evans a98632d5c2 [ruby/webrick] Enabled chunked encoding if Transfer-Encoding: chunked header is set
Patch from Leonard Garvey.

Fixes Ruby Bug 9986.

https://github.com/ruby/webrick/commit/8cff7f3995
2019-11-30 17:50:13 +09:00
Hiroshi SHIBATA edfbffb241 [ruby/webrick] Bump version to 1.6.0
https://github.com/ruby/webrick/commit/c5635fa5e2
2019-11-30 17:49:10 +09:00
Jeremy Evans c75100d004 [ruby/webrick] Allow WEBrick::HTTPServlet::CGIHandler :CGIInterpreter option to be array
This way you don't need to escape each entry.

Implements Ruby Feature 15170.

https://github.com/ruby/webrick/commit/d8086e600c
2019-11-30 17:48:15 +09:00
zverok f7cf5416e4 [ruby/webrick] Document HTTPResponse#body callable option
https://github.com/ruby/webrick/commit/d51836d03d
2019-11-30 17:47:49 +09:00
Hiroshi SHIBATA ea4272d02b [ruby/fileutils] Bump version to 1.4.0
https://github.com/ruby/fileutils/commit/f92145b10b
2019-11-30 17:36:13 +09:00
Hiroshi SHIBATA 3b9e1c0b2e
Move gemspec of fileutils under the toplevel of lib directory. 2019-11-30 17:32:38 +09:00
Nobuyoshi Nakada eab88d20ea [ruby/fileutils] Fix #install with "X" mode option
`FileUtils#install` methed raises an unexpected `TypeError`, when
called with `mode:` option which has `"X"`.

```
$ ruby -rfileutils -e 'FileUtils.install("tmp/a", "tmp/b", mode: "o+X")'
/opt/local/lib/ruby/2.7.0/fileutils.rb:942:in `directory?': no implicit conversion of File::Stat into String (TypeError)
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:942:in `block (3 levels) in symbolic_modes_to_i'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:933:in `each_char'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:933:in `each'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:933:in `inject'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:933:in `block (2 levels) in symbolic_modes_to_i'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:931:in `each'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:931:in `each_slice'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:931:in `block in symbolic_modes_to_i'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:926:in `each'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:926:in `inject'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:926:in `symbolic_modes_to_i'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:973:in `fu_mode'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:883:in `block in install'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:1588:in `block in fu_each_src_dest'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:1604:in `fu_each_src_dest0'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:1586:in `fu_each_src_dest'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:877:in `install'
	from -e:1:in `<main>'
```

In spite of that `symbolic_modes_to_i` considers the `File::Stat`
`path` case at the beginning, in `"X"` case, `path` is passed to
`FileTest.directory?` method which requires a `String`.  In such
case, the mode in `path` should be examined instead.

https://github.com/ruby/fileutils/commit/2ea54ade2f
2019-11-30 17:31:35 +09:00
Nobuyoshi Nakada 0a7d26bea1
[ruby/fileutils] Remove version.rb
Loading separate version.rb unnecessary increases every start-up
time.  In the other hand, the gemspec file is parsed only when
building the gem file.

https://github.com/ruby/fileutils/commit/8359cf7cce
2019-11-30 17:30:50 +09:00
Hiroshi SHIBATA 856f9990a9 [ruby/forwardable] Bump version to 1.3.0
https://github.com/ruby/forwardable/commit/e56f0f83c6
2019-11-30 15:54:09 +09:00
Jeremy Evans 9fa0166a58 [ruby/forwardable] Fix keyword argument separation warnings on Ruby 2.7+
Do so in a way that is also compatible with previous versions.

https://github.com/ruby/forwardable/commit/b2dd340988
2019-11-30 15:53:42 +09:00
aycabta f8cc05dec3 Use @eof variable for ReidlineInputMethod#eof?
"IRB::InputMethod#eof?" requires eof status each user input but
"ReidlineInputMethod#eof?" used "Reline.eof?" what is singleton data.
"ReidlineInputMethod#eof?" is changed to use the result of user input.
2019-11-30 11:20:39 +09:00
Hiroshi SHIBATA c50d30f659 Simplified ErrDimensionMismatch class 2019-11-30 08:00:40 +09:00
Hiroshi SHIBATA 2f66c443d7 Support argument for ErrNotRegular 2019-11-30 08:00:40 +09:00
Hiroshi SHIBATA 0c59bfae0a Also replace E2MM to standard exception class 2019-11-30 08:00:40 +09:00
Hiroshi SHIBATA c1059e99d3 Support existence usecase for the custom exception classes 2019-11-30 08:00:40 +09:00
Hiroshi SHIBATA 5044260dcd replace raise method from e2mmap on Scalar class 2019-11-30 08:00:40 +09:00
Hiroshi SHIBATA 9b950310be raise method accepts 3 argument with exception class 2019-11-30 08:00:40 +09:00
Hiroshi SHIBATA f47f2076fe Retire to maintain e2mmap on ruby core 2019-11-30 08:00:40 +09:00
Hiroshi SHIBATA 04511b994e Remove re-define embedded error classes and extract argument on custom error classes 2019-11-30 08:00:40 +09:00
Hiroshi SHIBATA d82c541ae4 Use simple exception classes instead of e2mmap 2019-11-30 08:00:40 +09:00
aycabta c4686b9235 Revert "Treat :@1, :@@1, @1, and @@1 correctly to check termination"
This reverts commit 5e275dd2af.

...The @1 type numberd parameter is reverted from Ruby syntax.
2019-11-29 17:38:18 +09:00
aycabta 7d75e94ea9 Fix regexp to complete complex literal
IRB completion logic always needed exponential notation for complex literal
such as 3e6i but it's bug. I fixed to support complex literal without
exponential notation such as 3i.
2019-11-28 15:22:38 +09:00
aycabta abe8fb49f0 Delete newline when C-k on emacs mode at EOL 2019-11-28 09:32:51 +09:00
aycabta 7769975c3c Remove two removed constants 2019-11-28 08:26:10 +09:00
aycabta 2d0a1a1869 Fix ghost method line no 2019-11-28 08:19:05 +09:00
aycabta 8b20829396 Remove an unnecessary variable 2019-11-26 19:22:38 +09:00
Takashi Kokubun 1fe31737d8
Slightly fix the warning message [ci skip]
I'm not sure, but maybe it was gramatically incorrect?
2019-11-26 01:20:29 -08:00
Takashi Kokubun 958641d991
Suggest an alternative to suppress the irb warning 2019-11-26 01:18:07 -08:00
aycabta fd956c72ea Cache loaded module to suppress method redefined warnings 2019-11-25 07:27:15 +09:00
aycabta 51ea1abb5f Remove e2mmap dependency 2019-11-25 05:38:09 +09:00
aycabta efbca15116 Remove lib/irb/slex.rb 2019-11-25 03:10:35 +09:00
aycabta 1aeb201d28 Remove debug code... 2019-11-24 23:29:09 +09:00
aycabta 745ab16818 Disable tracer ext of IRB when tracer doesn't found 2019-11-24 22:42:08 +09:00
aycabta b0614a0f96 Tracer.set_get_line_procs should support block and Proc object
Original Tracer.set_get_line_procs is implemented by
"def set_get_line_procs(p = proc)". It means that original
Tracer.set_get_line_procs supports block and Proc object.
2019-11-23 05:44:35 +09:00
aycabta 1ee010a317 Tracer.add_filter should support block and Proc object
Original Tracer.add_filter is implemented by "def add_filter(p = proc)". It
means that original Tracer.add_filter supports block and Proc object.
2019-11-23 05:43:07 +09:00
Kazuhiro NISHIYAMA 88d6009d91
Use more strict regexp to avoid to match naninanirb.rb 2019-11-21 23:10:30 +09:00
Jeremy Evans a9d4f2d03c Support %U/%u/%W/%w/%V/%g/%G formats in Time.strptime
Most of these formats were documented as supported, but were not
actually supported. Document that %g and %G are supported.

If %U/%W is specified without yday and mon/mday are not specified,
then Date.strptime is used to get the appropriate yday.

If cwyear is specifier without the year, or cwday and cweek are
specified without mday and mon, then use Date.strptime and convert
the resulting value to Time, since Time.make_time cannot handle
those conversions

Fixes [Bug #9836]
Fixes [Bug #14241]
2019-11-21 03:32:20 +02:00
aycabta 9131e62f18 [ruby/reline] Version 0.0.7
09d370bdc1
2019-11-21 07:14:27 +09:00
aycabta f30f78e2e0 Version 0.0.6 2019-11-21 07:04:53 +09:00
aycabta e4127cdd3e Version 1.1.0 2019-11-21 07:04:40 +09:00
aycabta 95f20f463a Consider escape sequence to calculate prompt width 2019-11-21 07:01:41 +09:00
aycabta eee70b41d4 Add a warning message and --legacy of an alias of --singleline 2019-11-21 02:44:35 +09:00
Y. Ushiki 9d6f78822c Refactor filter_backtrace 2019-11-21 02:44:35 +09:00
Y. Ushiki 04d0d93ebf Fix filter_backtrace for context-mode 0 2019-11-21 02:44:35 +09:00
aycabta 91bf3b7a77 Use singleline/multiline instead of readline/reidline 2019-11-21 02:44:35 +09:00
manga_osyo 6723aa07e5 Change argument `Proc` to `#call` defined object.
This is the same as the behavior of Readline.
2019-11-21 00:47:37 +09:00
manga_osyo 81586a4d9f Add <Home> <End> keys. 2019-11-21 00:47:36 +09:00
aycabta 633625a083 Mintty on Cygwin isn't a kind of command prompt, can process ANSI escape code 2019-11-20 17:55:19 +09:00
aycabta da0d7211aa Fix indent of a line when a newline is inserted to the next 2019-11-20 10:04:41 +09:00
aycabta 9306602f24 Replace typo "bock" with "block" 2019-11-20 09:58:33 +09:00
aycabta 19a310b0ac A preceding token of "do" of block has EXPR_CMDARG or EXPR_ENDFN
meth do # the preceding token of "do" has EXPR_CMDARG
  end

  meth() do # the preceding token of "do" has EXPR_ENDFN
  end
2019-11-20 09:56:13 +09:00
aycabta 49b4507fd3 Number sign comment (# bla bla) is a kind of newline character 2019-11-20 08:39:43 +09:00
aycabta bc0da8e3ff Generate history file path correctly when $HOME/.irbrc doesn't exist 2019-11-20 08:19:58 +09:00
Nobuyoshi Nakada cef9ebfbd3 Suppress `stty` error on Apple Terminal
`stty` called in `Reline::ANSI.deprep` command shows the following
error message on macOS Apple Terminal, with some settings.

```
$ LANG=C irb
irb(main):001:0>
stty: 'standard input': unable to perform all requested operations
stty: 'standard input': unable to perform all requested operations
```
2019-11-19 02:39:02 +09:00
Jeremy Evans 23f1fb0663 [ruby/rss] Only check taint on Ruby <2.7
Ruby 2.7 deprecates taint and it no longer has an effect.
2019-11-18 01:00:25 +02:00
Jeremy Evans 50013f7ebc [ruby/rexml] Only taint on Ruby <2.7
Ruby 2.7 deprecates taint and it no longer has an effect.
2019-11-18 01:00:25 +02:00
Jeremy Evans ffd0820ab3 Deprecate taint/trust and related methods, and make the methods no-ops
This removes the related tests, and puts the related specs behind
version guards.  This affects all code in lib, including some
libraries that may want to support older versions of Ruby.
2019-11-18 01:00:25 +02:00
Jeremy Evans c5c05460ac Warn on access/modify of $SAFE, and remove effects of modifying $SAFE
This removes the security features added by $SAFE = 1, and warns for access
or modification of $SAFE from Ruby-level, as well as warning when calling
all public C functions related to $SAFE.

This modifies some internal functions that took a safe level argument
to no longer take the argument.

rb_require_safe now warns, rb_require_string has been added as a
version that takes a VALUE and does not warn.

One public C function that still takes a safe level argument and that
this doesn't warn for is rb_eval_cmd.  We may want to consider
adding an alternative method that does not take a safe level argument,
and warn for rb_eval_cmd.
2019-11-18 01:00:25 +02:00
aycabta 7c6bedfe5c Remove unnecessary check 2019-11-18 03:23:45 +09:00
aycabta e7c5c60095 [ruby/irb] Remove ruby-token.rb from spec.files
https://github.com/ruby/irb/commit/0180dc74bc
2019-11-17 23:32:10 +09:00
aycabta be95d59160 [ruby/irb] Version 1.1.0.pre.4
https://github.com/ruby/irb/commit/4945d0e676
2019-11-17 23:32:10 +09:00
aycabta 910f9b8338 [ruby/reline] Version 0.0.5
https://github.com/ruby/reline/commit/d57c7ea252
2019-11-17 23:32:10 +09:00
Kazuhiro NISHIYAMA 449b2b9214
Fix typos 2019-11-17 13:11:25 +09:00
aycabta 11ae47c266 [ruby/reline] Restore left cursor key support on Unix like OSes...
https://github.com/ruby/reline/commit/98b72af751
2019-11-15 18:07:34 +09:00
aycabta fa7618e4c1 Implement em_set_mark and em_exchange_mark 2019-11-15 16:50:40 +09:00
Kazuhiro NISHIYAMA 6744593b8c
Fix a typo [ci skip] 2019-11-15 11:01:06 +09:00
aycabta a5b6d7bca8 Suppress warnings except for when last evaluation
Co-authored-by: Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
2019-11-13 15:15:28 +09:00
Kazuhiro NISHIYAMA d336db6568
Fix a typo 2019-11-13 15:04:49 +09:00
Hiroshi SHIBATA 546e50c2fb
Merge released version of RubyGems 3.1.0.pre3 2019-11-13 10:36:08 +09:00
Hiroshi SHIBATA bb9ecd026a Merge Bundler 2.1.0.pre3 released version 2019-11-13 10:19:51 +09:00
osyo-manga fe45bee093 Reline#readline and Reline#readmultiline to private. 2019-11-12 21:03:22 +09:00
Hiroshi SHIBATA f36a53d038
Only enabled mon_owned condition with Ruby 2.5+ 2019-11-12 19:36:41 +09:00
Nobuyoshi Nakada fb6a489af2
Revert "Method reference operator"
This reverts commit 67c5747369.
[Feature #16275]
2019-11-12 17:24:48 +09:00
Koichi Sasada fef4370b40 check more. 2019-11-12 10:07:45 +09:00
Koichi Sasada 4a30fabfcf Monitor owner state check correctly.
Monitor can be owned at the beginning of this method.
2019-11-12 09:37:34 +09:00
Yusuke Endoh 2407e89725 Revert "Use untaint for File.symlink in kernel_require.rb"
This reverts commit d9978ce5d3.

Untaint was tentatively restored due to test failures.  But now, the
failed tests have been removed, so we can revert the tentative fix.
2019-11-12 08:39:38 +09:00
Hiroshi SHIBATA d9978ce5d3
Use untaint for File.symlink in kernel_require.rb
Partly reverted 7d463e360b
2019-11-12 08:03:26 +09:00
Koichi Sasada b8d242d221 release RUBYGEMS_ACTIVATION_MONITOR correctly.
`File.symlink? safe_lp` can raise SecurityError and raising an
exception can leave RUBYGEMS_ACTIVATION_MONITOR locking. This
patch release it correctly.
2019-11-12 04:33:28 +09:00
Koichi Sasada 4be1e84d78 more messages 2019-11-12 04:13:54 +09:00
Koichi Sasada a815053a3e check monitor is owning for debug 2019-11-12 04:03:33 +09:00
Yusuke Endoh b72eda3c59 lib/rubygems.rb: Suppress "Resolving dependencies..."
And suppress "Leaked file descriptor" again.
2019-11-12 01:47:18 +09:00
aycabta 45bb6f28db Remove ruby-token.rb 2019-11-11 22:56:06 +09:00
Hiroshi SHIBATA bcfe94b7f2
Revert "Revert "Promote uri to default gems""
This reverts commit fdfad90522.

  f1f27da6c4 resolved this.
2019-11-11 22:21:43 +09:00
Hiroshi SHIBATA f1f27da6c4
Revert "Try to revert the test failure with Ruby CI"
This reverts commit 8b27c23b5d.
2019-11-11 21:49:21 +09:00
Hiroshi SHIBATA 8b27c23b5d
Try to revert the test failure with Ruby CI
https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian9/ruby-master/log/20191111T093005Z.fail.html.gz
2019-11-11 20:19:29 +09:00
Hiroshi SHIBATA 7585bc3187 Merge Bundler 2.1.0.pre.3
Features:
    - Add caller information to some deprecation messages to make them easier to fix [#7361](https://github.com/bundler/bundler/pull/7361)
    - Reconcile `bundle cache` vs `bundle package` everywhere. Now in docs, CLI help and everywhere else `bundle cache` is the preferred version and `bundle package` remains as an alias [#7389](https://github.com/bundler/bundler/pull/7389)
    - Display some basic `bundler` documentation together with ruby's RDoc based documentation [#7394](https://github.com/bundler/bundler/pull/7394)

  Bugfixes:
    - Fix typos deprecation message and upgrading docs [#7374](https://github.com/bundler/bundler/pull/7374)
    - Deprecation warnings about `taint` usage on ruby 2.7 [#7385](https://github.com/bundler/bundler/pull/7385)
    - Fix `--help` flag not correctly delegating to `man` when used with command aliases [#7388](https://github.com/bundler/bundler/pull/7388)
    - `bundle add` should cache newly added gems if an application cache exists [#7393](https://github.com/bundler/bundler/pull/7393)
    - Stop using an insecure folder as a "fallback home" when user home is not defined [#7416](https://github.com/bundler/bundler/pull/7416)
    - Fix `bundler/inline` warning about `Bundler.root` redefinition [#7417](https://github.com/bundler/bundler/pull/7417)
2019-11-11 18:56:25 +09:00
Hiroshi SHIBATA 7d463e360b Merge RubyGems 3.1.0.pre3
* Fix gem pristine not accounting for user installed gems. Pull request
    #2914 by Luis Sagastume.
  * Refactor keyword argument test for Ruby 2.7. Pull request #2947 by
    SHIBATA Hiroshi.
  * Fix errors at frozen Gem::Version. Pull request #2949 by Nobuyoshi
    Nakada.
  * Remove taint usage on Ruby 2.7+. Pull request #2951 by Jeremy Evans.
  * Check Manifest.txt is up to date. Pull request #2953 by David Rodríguez.
  * Clarify symlink conditionals in tests. Pull request #2962 by David
    Rodríguez.
  * Update command line parsing to work under ps. Pull request #2966 by
    David Rodríguez.
  * Properly test `Gem::Specifications.stub_for`. Pull request #2970 by
    David Rodríguez.
  * Fix Gem::LOADED_SPECS_MUTEX handling for recursive locking. Pull request
    #2985 by MSP-Greg.
2019-11-11 16:59:49 +09:00
Takashi Kokubun fcd9bc28e3
qsymbols and symbols should be colored as Symbol 2019-11-10 13:54:44 -08:00
Takashi Kokubun 25c53a8eec
Colorize on_symbols_beg (%I) 2019-11-10 13:41:41 -08:00
Takashi Kokubun b5996b25ae
Colorize string quotes as bold
like pry
2019-11-10 13:33:23 -08:00
David Rodríguez f48655d04d Remove unneeded exec bits from some files
I noticed that some files in rubygems were executable, and I could think
of no reason why they should be.

In general, I think ruby files should never have the executable bit set
unless they include a shebang, so I run the following command over the
whole repo:

```bash
find . -name '*.rb' -type f -executable -exec bash -c 'grep -L "^#!" $1 || chmod -x $1' _ {} \;
```
2019-11-09 21:36:30 +09:00
Hiroshi SHIBATA fdfad90522
Revert "Promote uri to default gems"
This reverts commit c5b4d2a259.

  This commit affects with activation feature of RubyGems.
  [Bug #16337][ruby-core:95768]
2019-11-09 20:16:03 +09:00
Hiroshi SHIBATA 352887b731
Remove YAML::VERSION because it conflicts with Psych::VERSION 2019-11-09 11:08:24 +09:00
Hiroshi SHIBATA c5b4d2a259
Promote uri to default gems 2019-11-09 07:32:34 +09:00
Hiroshi SHIBATA 8c9438d219
Promote yaml to default gems 2019-11-09 07:32:34 +09:00
Hiroshi SHIBATA 2a0ed5691e
Promote timeout to default gems 2019-11-09 07:32:34 +09:00
Hiroshi SHIBATA 5f206cebb9
Promote observer to default gems. But not yet released 2019-11-09 07:32:34 +09:00
Hiroshi SHIBATA fc1d06b25d
Added gemspec for readline gem that is wrapper library for reline and readline extension 2019-11-09 07:32:34 +09:00
aycabta 6e72b72881 Suppress "shadowing outer local variable" warning in 2.5 2019-11-08 16:18:36 +09:00
Hiroshi SHIBATA 3c252651e1
Fixed test failure related Net::Protocol 2019-11-07 17:09:22 +09:00
Hiroshi SHIBATA c916f9600b
SMTP is not module 2019-11-07 16:44:38 +09:00
Hiroshi SHIBATA fc85bdeb77
Promote cgi to default gems 2019-11-07 16:36:14 +09:00
Hiroshi SHIBATA 223d3c460a
Promote net-smtp to default gems 2019-11-07 16:36:14 +09:00
Hiroshi SHIBATA eb0b13596d
Promote net-pop to default gems 2019-11-07 16:36:14 +09:00
Hiroshi SHIBATA 77c94e0dd8
Promote benchmark to default gems 2019-11-07 16:36:14 +09:00
Hiroshi SHIBATA 1159dbf305
Promote delegate to default gems 2019-11-07 16:36:14 +09:00
Hiroshi SHIBATA 3b0bd34001
Promote pstore to default gems 2019-11-07 16:36:14 +09:00
Hiroshi SHIBATA 6797c3e371
Promote getoptlong to default gems 2019-11-07 16:36:14 +09:00
Hiroshi SHIBATA d1630d41ad
Promote open3 to default gems 2019-11-07 07:16:27 +09:00
Hiroshi SHIBATA 91135f6d29
Promote singleton to default gems 2019-11-07 07:16:26 +09:00
Kazuhiro NISHIYAMA 5251d18982
Time#strftime does not support `%Q`
```
% ruby -r date -e 't=Time.utc(2001,2,3,4,5,6,7);p t; p [t, t.to_date, t.to_datetime].map{|d|d.strftime("%Q")}'
2001-02-03 04:05:06.000007 UTC
["%Q", "981158400000", "981173106000"]
```
2019-11-06 09:46:48 +09:00
Jeremy Evans c4b627e2da Only taint on Ruby <2.7
Ruby 2.7 deprecates taint and it no longer has an effect.
2019-11-05 20:57:22 +09:00
Jeremy Evans 652800cc09 Only untaint line on Ruby <2.7
Untaint is deprecated and has no effect on Ruby 2.7+.
2019-11-05 20:54:46 +09:00
John Hawthorn ebbe396d3c Use ident hash for top-level recursion check
We track recursion in order to not infinite loop in ==, inspect, and
similar methods by keeping a thread-local 1 or 2 level hash. This allows
us to track when we have seen the same object (ex. using inspect) or
same pair of objects (ex. using ==) in this stack before and to treat
that differently.

Previously both levels of this Hash used the object's memory_id as a key
(using object_id would be slow and wasteful). Unfortunately, prettyprint
(pp.rb) uses this thread local variable to "pretend" to be inspect and
inherit its same recursion behaviour.

This commit changes the top-level hash to be an identity hash and to use
objects as keys instead of their object_ids.

I'd like to have also converted the 2nd level hash to an ident hash, but
it would have prevented an optimization which avoids allocating a 2nd
level hash for only a single element, which we want to keep because it's
by far the most common case.

So the new format of this hash is:

{ object => true } (not paired)
{ lhs_object => rhs_object_memory_id } (paired, single object)
{ lhs_object => { rhs_object_memory_id => true, ... } } (paired, many objects)

We must also update pp.rb to match this (using identity hashes).
2019-11-04 15:27:15 -08:00
Nobuyoshi Nakada ffa9298076
Fixed a typo 2019-11-04 16:38:36 +09:00
Nobuyoshi Nakada cbbdb4e5a2
[ruby/racc] Strip trailing whitespaces at the last line of actions
https://github.com/ruby/racc/commit/a887ebe529
2019-11-04 09:28:01 +09:00
aycabta ea97933645 Use prompt_list to calculate height by lines 2019-11-02 00:11:15 +09:00
Jeremy Evans d6ed7a984c Fix verbose warning being emitted
Fixes Ruby Bug 16281.
2019-10-31 17:51:50 +09:00
Jeremy Evans e4cd0d7287 [ruby/fileutils] Remove use of untaint on Ruby 2.7 to avoid deprecation warnings
https://github.com/ruby/fileutils/commit/5ac9a8a1f7
2019-10-31 15:41:46 +09:00
Hiroshi SHIBATA 6c3ed0d71c
Update the latest versions from upstream repository of racc 2019-10-30 21:36:59 +09:00
aycabta c8ce37d427 [ruby/rdoc] Support different drive latters in include paths
https://github.com/ruby/rdoc/commit/946d2592e2
2019-10-29 12:34:44 +09:00
aycabta 0547627705 Version 0.0.4 2019-10-29 10:35:43 +09:00
zverok 6221248294 Improve Net::HTTP docs:
* Make links from Net::GenericHTTPRequest work;
* Document +dest+ param of HTTPResponse#read_body;
* Slightly improve reference to particular response
  classes from HTTPResponse class docs.
2019-10-26 10:24:20 -07:00
zverok f93cb6904c OptionParser: document into: argument 2019-10-26 10:24:20 -07:00
zverok a24bff461d open-uri: change global docs to reflect that URI.open syntax is preferred 2019-10-26 10:24:20 -07:00
zverok de147bb721 Net::FTP: fix formatting problems for #status method 2019-10-26 10:24:20 -07:00
zverok 4fe06f4667 IRB: Document command evaluation history. 2019-10-26 10:24:20 -07:00
zverok f6f1377a4e Update ERB docs
* Actualize Notes about other templating engines;
* Document #location= method.
2019-10-26 10:24:20 -07:00
aycabta ad9c713728 Make `(#methodname)` a link with --hyperlink-all option 2019-10-26 16:27:23 +09:00
Nobuyoshi Nakada d70fdeedf0 Make `(#methodname)` a link 2019-10-26 15:48:11 +09:00
Hiroshi SHIBATA f14b754151
[ruby/forwardable] Use Gemfile instead of Gem::Specification#add_development_dependency.
https://github.com/ruby/forwardable/commit/1e7123a81b
2019-10-26 09:26:51 +09:00
Jeremy Evans 0098977053 [ruby/forwardable] Remove string allocation in def_{instance,single}_delegators
https://github.com/ruby/forwardable/commit/1a994c90e1
2019-10-26 09:25:11 +09:00
Jeremy Evans d00551a7bb [ruby/forwardable] Make def_{instance,single}_delegators skip :__send__ and :__id__
Previously, __send__ and __id__ were skipped if provided as strings,
but not skipped if provided as symbols.

Fixes Ruby Bug 8855.

https://github.com/ruby/forwardable/commit/2e61c8c66c
2019-10-26 09:25:06 +09:00
Hiroshi SHIBATA b15e0983f7 [ruby/forwardable] Update spec.files
https://github.com/ruby/forwardable/commit/1b6991e589
2019-10-26 09:25:01 +09:00
Hiroshi SHIBATA b25ab3832f [ruby/forwardable] Extracted VERSION constant for gemspec
https://github.com/ruby/forwardable/commit/387758d45a
2019-10-26 09:24:55 +09:00
aycabta 7bcc639c72 Rename old var name with new name 2019-10-25 10:07:17 +09:00
Hiroshi SHIBATA 09936d1d74
[ruby/tracer] Use Gemfile instead of Gem::Specification#add_development_dependency.
https://github.com/ruby/tracer/commit/9df7d7937b
2019-10-25 09:29:10 +09:00
Jeremy Evans 1fb4584825 Remove unsused output_method argument
Fixes Ruby Bug 9876.
2019-10-24 23:47:50 +09:00
Jeremy Evans f126d80b1e [ruby/webrick] Don't check tainting in access log escaping
Only untaint result on Ruby <2.7, as taint support is deprecated
in Ruby 2.7+ and no longer has an effect.

https://github.com/ruby/webrick/commit/4c430f9410
2019-10-24 19:47:29 +09:00
Jeremy Evans c28d50a753 [ruby/webrick] Support literal IPv6 addresses in X-Forwarded-Host
https://github.com/ruby/webrick/commit/6b6990ec81
2019-10-24 19:47:20 +09:00
Jeremy Evans 37c266aa57 [ruby/webrick] Remove the squishing of whitespace in header values
While the stripping of header values is required by RFC 2616 4.2 and
RFC 7230 3.2.4, the squishing is not and can break things, such as
when one header contains an HMAC of another header.

Fixes Ruby Bug 7021.

https://github.com/ruby/webrick/commit/8b96088a86
2019-10-24 19:47:10 +09:00
Hiroshi SHIBATA 84ed4c3d59 [ruby/webrick] bump version to 1.5.0
https://github.com/ruby/webrick/commit/00c281caa7
2019-10-24 19:47:01 +09:00
Jeremy Evans 8189d496df [ruby/webrick] Remove Webrick::HTTPResponse#to_s
It is currently broken, and even if it worked, it can cause problems
when debugging.  See Ruby Bug 10715.

https://github.com/ruby/webrick/commit/575dea8656
2019-10-24 19:46:08 +09:00
Hiroshi SHIBATA 65e8267938
Revert "Fixed the require path for e2mmap version file."
This reverts commit ff953a003e.
2019-10-24 16:17:17 +09:00
Hiroshi SHIBATA ff953a003e
Fixed the require path for e2mmap version file. 2019-10-24 16:12:34 +09:00
aycabta 6df6611ce7 Treat only left alt key as meta-key on Windows
On German keyboard, right alt key acts as like shift key.

Ex. right-alt-8 is just "[". This input doesn't have meta-key statement.
2019-10-24 02:49:14 +09:00
aycabta 7bc787fa06 Support forced enter insertion by Ctrl+Enter on Windows 2019-10-24 00:12:58 +09:00
aycabta 039faecdb8 Suppress duplicated "require 'reline'" 2019-10-23 23:59:53 +09:00
aycabta 8bb716ab91 Fix indent... 2019-10-23 19:57:31 +09:00
Jeremy Evans f37cc1c719 Fallback to TCP in resolv if UDP bind raises EACCES
Original patch from Andy Grimm.

Fixes [Bug #10747]
2019-10-21 12:48:38 -07:00
Nobuyoshi Nakada 263ee6639d
Make suggestions order stable [Bug #16263]
As the result order of `DidYouMean::SpellChecker#correct` is
undefined, keep the order of the original candidates.
2019-10-21 09:54:11 +09:00
Koichi Sasada caac5f777a
make monitor.so for performance. (#2576)
Recent monitor.rb has performance problem because of interrupt
handlers. 'Monitor#synchronize' is frequently used primitive
so the performance of this method is important.

This patch rewrite 'monitor.rb' with 'monitor.so' (C-extension)
and make it faster. See [Feature #16255] for details.

Monitor class objects are normal object which include MonitorMixin.
This patch introduce a Monitor class which is implemented on C
and MonitorMixin uses Monitor object as re-entrant (recursive)
Mutex. This technique improve performance because we don't need
to care atomicity and we don't need accesses to instance variables
any more on Monitor class.
2019-10-20 04:52:20 +09:00