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

7984 Коммитов

Автор SHA1 Сообщение Дата
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
Nobuyoshi Nakada e2b719bed6
Support DidYouMean by AmbiguousOption too 2019-10-18 17:46:53 +09:00
Nobuyoshi Nakada b4d308b419
Defer adding additional info until getting the message of an error 2019-10-18 17:39:16 +09:00
Nobuyoshi Nakada 46fa301e82
Use DidYouMean.formatter
Instead of building messages separately.
2019-10-18 15:18:36 +09:00
Yusuke Endoh c3b64a86bc lib/optparse.rb: Show a did_you_mean hint for unknown option
```
require 'optparse'

OptionParser.new do |opts|
  opts.on("-f", "--foo", "foo") {|v| }
  opts.on("-b", "--bar", "bar") {|v| }
  opts.on("-c", "--baz", "baz") {|v| }
end.parse!
```

```
$ ruby test.rb --baa
Traceback (most recent call last):
test.rb:7:in `<main>': invalid option: --baa (OptionParser::InvalidOption)
Did you mean?  baz
               bar
```
2019-10-18 12:20:58 +09:00
Seiei Miyagi 5ca5529d22 Fix warning of generated parser for nested module 2019-10-17 19:23:50 -07:00
aycabta 8c0629ba58 Treat key sequences from getwch() that start from 0 or 0xE0 correctly 2019-10-18 02:54:20 +09:00
aycabta 58657fa134 Add numeric keypad key sequences on Windows 2019-10-18 02:54:20 +09:00
aycabta 53c05a6cf4 Remove freeze 2019-10-18 02:54:20 +09:00
aycabta 13b106a19c Ignore the input method key sequence from getwch() correctly
The function getwch() returns some key sequences which start from 0 or 0xE0
with a following key code. Alt+` that is on/off key for input methods gives 0
and 41 so Reline was always ignoring 0 and following keys but numeric keypad
keys give 0 and following actual keys. This commit changes the behavior to be
ignoring only the 0 and 41 sequence.
2019-10-18 02:54:20 +09:00
aycabta d1a7305848 Insert multiline incremental search result correctly 2019-10-18 00:44:56 +09:00
aycabta 41457dcbe0 Remove unused variable 2019-10-17 16:54:06 +09:00
aycabta 60a0c20cb6 Refactor prompt generation logic 2019-10-17 16:35:18 +09:00
Kazuhiro NISHIYAMA 37457117c9
Use `\&` instead of `\1` with capture 2019-10-17 12:51:29 +09:00
Jeremy Evans d5744aff3a Fix DRbServer#any_to_s
My previous fix in d0ed935d5b was
not correct, as pointed out by cremno on GitHub.

This simplifies things by just using Kernel#to_s.  Also switch to
bind_call(obj) instead of bind(obj).call for better performance.
2019-10-16 12:51:13 -07:00
Jeremy Evans 567e312d1f Do not raise an exception on a closed DRb socket
This rescues some exceptions that could happen with a closed or
shutdown DRb socket. This can prevent the server from
exiting if an client socket is closed directly after it is
accepted.

Fixes [Bug #8039]
2019-10-16 12:51:13 -07:00
Jeremy Evans 50b8033d6b Handle subclasses of Exception in drb
This makes it so that client instances that call a method on a
server-side object that raise a subclass of Exception are handled
similarly to those that raise a subclass of StandardError.

Only reraise exceptions that we are fairly sure we don't want to
rescue.

Fixes [Bug #5618]
2019-10-16 12:51:13 -07:00
aycabta db84123600 Calculate prompt width correctly 2019-10-17 02:19:01 +09:00
aycabta e26c6d4ab8 Collect multiline prompt logic into a method 2019-10-17 01:56:20 +09:00
aycabta 7df227804a Support multiline history in incremental search 2019-10-16 22:35:58 +09:00
aycabta 259601ab57 Support backspace in incremental search 2019-10-16 02:55:45 +09:00
aycabta a5245c1658 C-r is incremental history search in vi insert mode 2019-10-16 02:08:52 +09:00
Nobuyoshi Nakada c01df7e58f
Fixed the key to delete [Bug #16250]
f94202fcc2 (commitcomment-35505076)

Co-Authored-By: Ary Borenszweig <asterite@gmail.com>
2019-10-15 23:16:24 +09:00
Hiroshi SHIBATA e0e93a199d
[rubygems/rubygems] Bump version to 3.1.0.pre2
https://github.com/rubygems/rubygems/commit/a7a673ce22
2019-10-15 20:57:01 +09:00
Nobuyoshi Nakada f94202fcc2
Use compare_by_identity hash [Bug #16250] 2019-10-15 19:41:16 +09:00
Takashi Kokubun c800967acd
Simplify circular reference check of IRB::Color 2019-10-14 21:58:13 -07:00
Ary Borenszweig 96617ad1d5 IRB colorize: take into account recursive arrays and hashes (#2555)
[Bug #16250]
2019-10-14 21:25:05 -07:00
Masatoshi SEKI c3a6260302 add require "monitor" 2019-10-14 22:56:37 +09:00
Masatoshi SEKI 8488d5b5b6 Automatically close fds on fork (and GC). The connection pools are maintained at thread scope. 2019-10-14 20:30:22 +09:00
Jeremy Evans d0ed935d5b Fix some DRb issues (#2552)
* Handle BasicObject in drb

Also fix a bug in rescue clause of any_to_s because sprintf
does not handle the %l modifier.

Fixes [Bug #7833]

* Do not send a reply to the client if there is a connection error

This allows for normal TCP shutdown (fin-ack-fin-ack instead of
fin-ack-push-rst).

Patch from pierre@mouraf.org (Pierre-Alexandre Meyer).

Fixes [Bug #2339]

* Detect fork and do not reuse forked connections in drb

This associates each DRbConn with a pid, and if the pid changes,
it closes any DRbConns in the pool with a pid that no longer
matches.  This fixes DRb servers from sending messages intended
for one client to another client after forking.

Fixes [Bug #2718]
Fixes [Bug #14471]
2019-10-14 14:20:32 +09:00
Sutou Kouhei 92df7d98b6
Import CSV 3.1.2 (#2547) 2019-10-12 14:03:21 +09:00
Sutou Kouhei 412cd56766
Import REXML 3.2.3 (#2548) 2019-10-12 12:07:15 +09:00
Kazuhiro NISHIYAMA d6c80876b7
Use `bind_call` instead of `bind` and `call` 2019-10-11 13:50:27 +09:00
takkanm 87958520f3 set real path to __FILE__ and __dir__ in Binding#irb
When reading Binding#irb, the file of the calling source is reflected in __FILE__ and __dir__.
2019-10-11 09:33:25 +09:00
Jeremy Evans 2322c94dd6 Support delegates for BasicObject
For BasicObject, bind the Kernel respond_to? instance method to the
object and call it instead of calling the method directly.

Also, use bind_call(recv, ...) for better performance.

Fixes [Bug #16127]
2019-10-10 13:15:00 -07:00
Jean Boussier 717b72a8af [rubygems/rubygems] Optimize Gem::Package::TarReader#each
https://github.com/rubygems/rubygems/commit/1de8f39ac4
2019-10-10 14:51:45 +09:00
Pavel Valena b439ee1b8f Remove uselsess shebang
as the file is not executable anyway.
2019-10-09 12:41:41 +09:00
aycabta 12d05537d7 Update required_ruby_version to 2.4.0 2019-10-09 12:25:50 +09:00
Jeremy Evans 7909f06212 Check for invalid hex escapes in URI#query=
Fixes [Bug #11275]
2019-10-08 07:30:55 -07:00
aycabta f4252f6496 Version 0.0.3 2019-10-07 16:14:03 +09:00
aycabta a9e9cd2036 Flush console just after printing 2019-10-07 14:15:05 +09:00
aycabta 136116819e Use built-in Win32API on JRuby
It's fixed for JRuby dedicatedly.
2019-10-07 14:15:05 +09:00
bronzdoc 7d4ab8bbe7
[rubygems/rubygems] Use dependency.identity in available_specs
https://github.com/rubygems/rubygems/commit/bde88f00a1
2019-10-05 10:50:02 +09:00
bronzdoc b659c1b92f
[rubygems/rubygems] Add Gem::Dependency#identity method
https://github.com/rubygems/rubygems/commit/05146bb2fd
2019-10-05 10:50:02 +09:00
Nobuyoshi Nakada caa9d0bd78
[rubygems/rubygems] Always pass an encoding option to Zlib::GzipReader.wrap
The arity of this method has been -1 since the import, so the
option has been passed always, even if Zlib::GzipReader#initialize
does not take the option.  Actually it takes the option since 1.9.

https://github.com/rubygems/rubygems/commit/2fcde0f4e0
2019-10-05 10:50:01 +09:00
Yusuke Endoh 3ce238b5f9 WEBrick: prevent response splitting and header injection
This is a follow up to d9d4a28f1c.
The commit prevented CRLR, but did not address an isolated CR or an
isolated LF.

Co-Authored-By: NARUSE, Yui <naruse@airemix.jp>
2019-10-01 19:19:56 +09:00
Nobuyoshi Nakada 36e057e26e Loop with String#scan without creating substrings
Create the substrings necessary parts only, instead of cutting the
rest of the buffer.  Also removed a useless, probable typo, regexp.
2019-10-01 19:19:56 +09:00
Jeremy Evans 869e2dd8c8 Warn for URI.{,un}{escape,encode}, even if not in verbose mode
The verbose mode warning has been present for almost 10 years.
If we ever plan to remove these methods, we should make the warning
a regular deprecation warning so that people are aware.

Implements [Feature #15961]
2019-09-27 07:43:32 -07:00
Jeremy Evans a2c26fe1c6 Fix fallback in URI.encode_www_form_component to include #
Patch from Matthew Kerwin.

Fixes [Bug #14358]
2019-09-27 07:43:32 -07:00
Jeremy Evans 43a16c98df Do not escape + in Shellwords.escape
+ is not a character that requires escaping in Bourne sh.

Fixes [Bug #14429]
2019-09-27 07:43:32 -07:00
Jeremy Evans 2b6a9f3a1f Ignore Errno::EPIPE when sending requests in net/http
An EPIPE when sending the request should be ignored.  Even if you
cannot write more data, you may still be able to read the server's
response.

Fixes [Bug #14466]
2019-09-27 07:43:32 -07:00
Hiroshi SHIBATA 2082a26dc7
[ruby/fileutils] Bump version to 1.3.0.
https://github.com/ruby/fileutils/commit/ba3bd6fdfd
2019-09-27 11:39:02 +09:00
Hiroshi SHIBATA 49b7805e9a
[ruby/fileutils] Use Gemfile instead of Gem::Specification#add_development_dependency.
https://github.com/ruby/fileutils/commit/17a9de6d9b
2019-09-27 11:39:02 +09:00
Kazuhiro NISHIYAMA d5355123cc
[ruby/fileutils] Reduce global variables
https://github.com/ruby/fileutils/commit/ba81f024cf
2019-09-27 11:39:02 +09:00
Jeremy Evans 06c35cfa65
[ruby/fileutils] Fix cp_r with symlink root on Windows
Previously this would copy the symlink root as a symlink instead
of creating a new root directory.  This modifies the source
to expand it using File.realpath before starting the copy.

Fixes Ruby Bug 12123

https://github.com/ruby/fileutils/commit/7359cef359
2019-09-27 11:39:02 +09:00
Jeremy Evans 9494ef8b2d
[ruby/fileutils] Do not break in verbose mode if using FileUtils with a frozen object
If FileUtils is included into another object, and verbose mode is
used, a FrozenError is currently raised unless the object has the
@fileutils_output and @fileutils_label instance variables.

This fixes things so that it does not attempt to set the instance
variables, but it still uses them if they are present.

https://github.com/ruby/fileutils/commit/689cb9c56a
2019-09-27 11:39:02 +09:00
Jeremy Evans 1d99163aa5
[ruby/fileutils] Make copy methods handle FIFOs and UNIX sockets
Previously, this was broken.  Trying to copy a FIFO would raise a
NoMethodError if File.mkfifo was defined.  Trying to copy a UNIX
socket would raise a RuntimeError as File.mknod is not something
Ruby defines.

Handle the FIFO issue using File.mkfifo instead of mkfifo.

Handle the UNIX Socket issue by creating a unix socket.

Continue to not support character or block devices, raising a
RuntimeError for both.

Add tests for FIFO, UNIX Socket, and character/block devices.

https://github.com/ruby/fileutils/commit/123903532d
2019-09-27 11:39:02 +09:00
zverok 366dd9d803
[ruby/fileutils] Update the documentation content and formatting
https://github.com/ruby/fileutils/commit/b701353c53
2019-09-27 11:39:02 +09:00
Nobuyoshi Nakada c4ec817a7a
Gem::Specification#to_ruby needs OpenSSL 2019-09-26 22:56:32 +09:00
David Rodríguez a2af473018
[rubygems/rubygems] Make sure our modifications to kernel.warn work
And test the fix we're adding.

https://github.com/rubygems/rubygems/commit/6f86637b98
2019-09-26 17:48:01 +09:00
David Rodríguez 54839f0173
[rubygems/rubygems] Fix jruby build
https://github.com/rubygems/rubygems/commit/cc255b774a
2019-09-26 17:48:01 +09:00
Hiroshi SHIBATA 1eb503373e
[rubygems/rubygems] filter dependency type and name strictly.
Co-authored-by: Yusuke Endoh <mame@ruby-lang.org>

https://github.com/rubygems/rubygems/commit/92892bbc3a
2019-09-26 17:48:01 +09:00
David Rodríguez 4f87a1583d
[rubygems/rubygems] Introduce default prerelease requirement
https://github.com/rubygems/rubygems/commit/506c5bce49
2019-09-26 17:48:01 +09:00
David Rodríguez 6134fd7a64
[rubygems/rubygems] Remove comment not adding much
https://github.com/rubygems/rubygems/commit/b3b5c2d379
2019-09-26 17:48:01 +09:00
f 73633683c5
[rubygems/rubygems] add tests
https://github.com/rubygems/rubygems/commit/8a7e27381c
2019-09-26 17:48:01 +09:00
f 1fb44d2b8c
[rubygems/rubygems] Detect libc version, closes #2918
https://github.com/rubygems/rubygems/commit/1d18b12a26
2019-09-26 17:48:01 +09:00
David Rodríguez ea5b136155
[rubygems/rubygems] Fix underscore version for bundler itself
Previously it wouldn't play nice with the bundler version finder.

https://github.com/rubygems/rubygems/commit/d8bb81556d
2019-09-26 17:48:01 +09:00
bronzdoc 5c872b297c
[rubygems/rubygems] Avoid adding OpenSSL::PKey::RSA instances
https://github.com/rubygems/rubygems/commit/ba021fb4be
2019-09-26 17:48:01 +09:00
bronzdoc 2e9c078707
[rubygems/rubygems] Fix indentation in case statement
https://github.com/rubygems/rubygems/commit/8ac0647659
2019-09-26 17:48:00 +09:00
bronzdoc 8f2379b0c5
[rubygems/rubygems] Make ruby_code method handle OpenSSL::PKey::RSA objects
https://github.com/rubygems/rubygems/commit/b1d825ab3a
2019-09-26 17:48:00 +09:00
Ellen Marie Dash 508afe2c26
[rubygems/rubygems] Set SOURCE_DATE_EPOCH env var if not provided.
Fixes #2290.

1. `Gem::Specification.date` returns SOURCE_DATE_EPOCH when defined,
2. this commit makes RubyGems set it _persistently_ when not provided.

This combination means that you can build a gem, check the build time,
and use that value to generate a new build -- and then verify they're
the same.

https://github.com/rubygems/rubygems/commit/d830d53f59
2019-09-26 17:48:00 +09:00
Daniel Berger 8436b2717c
[rubygems/rubygems] Add a gem attr to the Gem::Package class.
https://github.com/rubygems/rubygems/commit/5b81f364ae
2019-09-26 17:48:00 +09:00
Jeremy Evans 3b302ea8c9 Add Module#ruby2_keywords for passing keywords through regular argument splats
This approach uses a flag bit on the final hash object in the regular splat,
as opposed to a previous approach that used a VM frame flag.  The hash flag
approach is less invasive, and handles some cases that the VM frame flag
approach does not, such as saving the argument splat array and splatting it
later:

  ruby2_keywords def foo(*args)
    @args = args
    bar
  end
  def bar
    baz(*@args)
  end
  def baz(*args, **kw)
    [args, kw]
  end
  foo(a:1)    #=> [[], {a: 1}]
  foo({a: 1}, **{}) #=> [[{a: 1}], {}]

  foo({a: 1}) #=> 2.7: [[], {a: 1}] # and warning
  foo({a: 1}) #=> 3.0: [[{a: 1}], {}]

It doesn't handle some cases that the VM frame flag handles, such as when
the final hash object is replaced using Hash#merge, but those cases are
probably less common and are unlikely to properly support keyword
argument separation.

Use ruby2_keywords to handle argument delegation in the delegate library.
2019-09-25 12:33:52 -07:00
Jeremy Evans 80b5a0ff2a
Make rb_scan_args handle keywords more similar to Ruby methods (#2460)
Cfuncs that use rb_scan_args with the : entry suffer similar keyword
argument separation issues that Ruby methods suffer if the cfuncs
accept optional or variable arguments.

This makes the following changes to : handling.

* Treats as **kw, prompting keyword argument separation warnings
  if called with a positional hash.

* Do not look for an option hash if empty keywords are provided.
  For backwards compatibility, treat an empty keyword splat as a empty
  mandatory positional hash argument, but emit a a warning, as this
  behavior will be removed in Ruby 3.  The argument number check
  needs to be moved lower so it can correctly handle an empty
  positional argument being added.

* If the last argument is nil and it is necessary to treat it as an option
  hash in order to make sure all arguments are processed, continue to
  treat the last argument as the option hash. Emit a warning in this case,
  as this behavior will be removed in Ruby 3.

* If splitting the keyword hash into two hashes, issue a warning, as we
  will not be splitting hashes in Ruby 3.

* If the keyword argument is required to fill a mandatory positional
  argument, continue to do so, but emit a warning as this behavior will
  be going away in Ruby 3.

* If keyword arguments are provided and the last argument is not a hash,
  that indicates something wrong. This can happen if a cfunc is calling
  rb_scan_args multiple times, and providing arguments that were not
  passed to it from Ruby.  Callers need to switch to the new
  rb_scan_args_kw function, which allows passing of whether keywords
  were provided.

This commit fixes all warnings caused by the changes above.

It switches some function calls to *_kw versions with appropriate
kw_splat flags. If delegating arguments, RB_PASS_CALLED_KEYWORDS
is used.  If creating new arguments, RB_PASS_KEYWORDS is used if
the last argument is a hash to be treated as keywords.

In open_key_args in io.c, use rb_scan_args_kw.
In this case, the arguments provided come from another C
function, not Ruby.  The last argument may or may not be a hash,
so we can't set keyword argument mode.  However, if it is a
hash, we don't want to warn when treating it as keywords.

In Ruby files, make sure to appropriately use keyword splats
or literal keywords when calling Cfuncs that now issue keyword
argument separation warnings through rb_scan_args.  Also, make
sure not to pass nil in place of an option hash.

Work around Kernel#warn warnings due to problems in the Rubygems
override of the method.  There is an open pull request to fix
these issues in Rubygems, but part of the Rubygems tests for
their override fail on ruby-head due to rb_scan_args not
recognizing empty keyword splats, which this commit fixes.

Implementation wise, adding rb_scan_args_kw is kind of a pain,
because rb_scan_args takes a variable number of arguments.
In order to not duplicate all the code, the function internals need
to be split into two functions taking a va_list, and to avoid passing
in a ton of arguments, a single struct argument is used to handle
the variables previously local to the function.
2019-09-25 11:18:49 -07:00
Nobuyoshi Nakada ae83dbe28d Get rid of `IO.select` to fix multiline paste 2019-09-26 00:26:33 +09:00
aycabta b443bdbdb9 Use short wait for select(2)
It is one of the reasons why paste to IRB is slow.
2019-09-23 17:33:25 +09:00
aycabta 934507472c Retrieve key-buffer that was supposed to lose 2019-09-23 17:27:01 +09:00
Hiroshi SHIBATA 9d25c652a9
Removed ThreadsWait from the ruby repository 2019-09-20 14:21:04 +09:00
Hiroshi SHIBATA 37c0839425
Removed Synchronizer from the ruby repository. 2019-09-20 14:06:22 +09:00
Hiroshi SHIBATA 3b56a0934f
Removed Shell from the ruby repository. 2019-09-20 12:56:18 +09:00
Hiroshi SHIBATA 67a6662032
Removed Scanf from the ruby repository. 2019-09-20 12:43:11 +09:00
Hiroshi SHIBATA a3b8501614
Removed CMath from the ruby repository. 2019-09-20 12:31:37 +09:00
Nobuyoshi Nakada 6180f1fede
Added link_command for C++ 2019-09-19 19:06:18 +09:00
Nobuyoshi Nakada e2aac6a611
Separate @have_devel for C++ 2019-09-19 12:25:48 +09:00
Nobuyoshi Nakada 842f600a93
Look up the language module
Look up language module with `MakeMakefile.[]`, insted of a
accessing constant under that module directly, to get rid of
expose the constant to the toplevel inadvertently.
2019-09-19 00:03:18 +09:00
Nobuyoshi Nakada f9d0778fca
Removed MakeMakefile::C
It is exposed to the topleven namespace via included MakeMakefile.
2019-09-18 22:53:23 +09:00
Nobuyoshi Nakada 9bd77d7cf3
Removed a debug print [ci skip] 2019-09-18 22:53:22 +09:00
Nobuyoshi Nakada c3f03da494
[EXPERIMENTAL] MakeMakefile::CXX for C++ 2019-09-18 18:47:02 +09:00
Bundlerbot 434af7303c
[bundler/bundler] Merge #7340
7340: Fix bundle clean issue r=deivid-rodriguez a=deivid-rodriguez

### What was the end-user problem that led to this PR?

The problem was that `bundle clean` is crashing under some conditions.

### What was your diagnosis of the problem?

My diagnosis was that sometimes (when the bundle includes git sourced gems with extensions), it assumes that some paths exist, but they don't.

### What is your fix for the problem, implemented in this PR?

My fix is to ignore those paths.

### Why did you choose this fix out of the possible options?

I chose this fix because it fixes the issue.

Fixes #7338.

Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
(cherry picked from commit b007fde67c77c1f15f13b97eda186644c2a2be04)

https://github.com/bundler/bundler/commit/3766053507
2019-09-18 18:26:33 +09:00
David Rodríguez e6ad9452b6
[bundler/bundler] Fix remembered flag deprecation message
It was suggested a deprecated command as a fix.

https://github.com/bundler/bundler/commit/e330a9a34f
2019-09-18 18:26:33 +09:00
David Rodríguez 1cb8cf5df0
[bundler/bundler] Version 2.1.0.pre.2
https://github.com/bundler/bundler/commit/6e9774b377
2019-09-18 18:26:33 +09:00
David Rodríguez 0c6529bac2
[bundler/bundler] Revert "Add all platforms to lockfile by default"
This reverts commit 3dc509e645abb497e4dc92a7c42be471ff87db0b.

https://github.com/bundler/bundler/commit/b5766564fb
2019-09-18 18:26:32 +09:00
David Rodríguez 6f16ededdd
[bundler/bundler] Revert "Remove now meaningless warning"
This reverts commit 00b095b98fe4bd44950beaf3bc9f1d91eac7b69e.

https://github.com/bundler/bundler/commit/e93bce3b20
2019-09-18 18:26:32 +09:00
David Rodríguez f18d88b535
[bundler/bundler] Revert "Remove now meaningless setting"
This reverts commit 52c5a0eedec34b5d86464b3cf135dc2002486f1d.

https://github.com/bundler/bundler/commit/b4cc36deb9
2019-09-18 18:26:32 +09:00
David Rodríguez 399501cdfe
[bundler/bundler] Revert "Remove now unused method"
This reverts commit 3a2d2f025081755bdb38af660897e7b2f749a33a.

https://github.com/bundler/bundler/commit/13cef81582
2019-09-18 18:26:32 +09:00
Takayuki Nakata c27aaf1a8f
[bundler/bundler] Fix comments and messages to refer to https url
https://github.com/bundler/bundler/commit/a86b49f1b9
2019-09-18 18:26:32 +09:00
David Rodríguez c92e098781
[bundler/bundler] Fix --path option descriptions
To not mention that the flag is remembered when it's not.

https://github.com/bundler/bundler/commit/82f0b95854
2019-09-18 18:26:32 +09:00
David Rodríguez a29ead52e1
[bundler/bundler] Deprecate `--path` flag to `bundle check`
https://github.com/bundler/bundler/commit/0a0e7cf5ec
2019-09-18 18:26:32 +09:00
Nobuyoshi Nakada 68ffb679d4 Undefine DSUSP key
Enable `Ctrl+Y`, which is bound with it by default on BSD-like
systems, for editing.
2019-09-17 15:16:12 +09:00
Adam Cammack f9332ad833 Fix previous history in vi_insert mode 2019-09-17 15:14:38 +09:00
Adam Cammack a3533bc904 Fix history navigation in vi_insert mode 2019-09-17 15:14:38 +09:00
Nobuyoshi Nakada 3bb1162cac
Folded files in gemspec 2019-09-16 21:51:48 +09:00
aycabta 98f919ed47 The stdlib readline should raise Interrupt when pressing C-c 2019-09-14 00:16:31 +09:00
aycabta 83ef23bd75 Revert "Use IO#getch to read one char in raw mode"
This reverts commit 805b0a4811.
2019-09-14 00:11:01 +09:00
aycabta e8fff0ec9c Revert "Use IO#getbyte"
This reverts commit 685f12bbca.
2019-09-14 00:10:45 +09:00
aycabta 06bbacc086 Revert "Support multibyte input"
This reverts commit 6d9e54816f.
2019-09-14 00:10:34 +09:00
Nobuyoshi Nakada 6d9e54816f Support multibyte input 2019-09-10 00:56:31 +09:00
Nobuyoshi Nakada 685f12bbca Use IO#getbyte 2019-09-10 00:56:31 +09:00
Nobuyoshi Nakada 805b0a4811 Use IO#getch to read one char in raw mode 2019-09-10 00:56:31 +09:00
Lars Kanis 551edf64bc Reline: Fix wrong variable name
This raised a NameError before.
2019-09-09 19:16:01 +09:00
aycabta e9bc8b35c6 Behave ESC key correctly when vi command mode 2019-09-08 03:26:35 +09:00
aycabta 3568029823 Remove .document and .gitignore from file list of rdoc.gemspec 2019-09-08 03:07:45 +09:00
Jeremy Evans 434582d888 Fix Tempfile.open to correctly pass keywords to Tempfile.new 2019-09-06 19:41:23 -07:00
Jeremy Evans 258843106f Fix SortedSet subclasses that override initialize
The first time SortedSet#initialize is called, it overwrites
itself, then recalls #initialize, which results in calling the
subclass's initialize, not the current initialize.

Just inline the default initialize behavior to avoid this issue.

No test for this as it can only be triggered the very first time
that SortedSet#initialize is called.

Fixes [Bug #15830]
2019-09-06 14:20:22 -07:00
David Rodríguez d9e6315177
[rubygems/rubygems] Bump rubocop to 0.74.0 and fix new offenses
https://github.com/rubygems/rubygems/commit/d4fc383497
2019-09-05 18:48:15 +09:00
Alexander Pakulov 0b9b0774c3 [rubygems/rubygems] Minor fix
https://github.com/rubygems/rubygems/commit/95c1f4e179
2019-09-05 18:44:02 +09:00
bronzdoc 73574756f9 [rubygems/rubygems] Add missing parentheses
https://github.com/rubygems/rubygems/commit/f5972338e0
2019-09-05 18:43:37 +09:00
bronzdoc 92be07b1e1 [rubygems/rubygems] Remove unnecessary gem_name method
https://github.com/rubygems/rubygems/commit/d1bb122651
2019-09-05 18:43:29 +09:00
bronzdoc b11cfed4c4 [rubygems/rubygems] Error out if there are multiple gemspecs and no gemspec is specified
https://github.com/rubygems/rubygems/commit/547947bbf0
2019-09-05 18:43:21 +09:00
bronzdoc a02da1012b [rubygems/rubygems] Build the first gemspec we found if no gemspec is specified
https://github.com/rubygems/rubygems/commit/ab186266b7
2019-09-05 18:42:56 +09:00
bronzdoc bcf51dd763 [rubygems/rubygems] Improve gemspec assignment and error message
https://github.com/rubygems/rubygems/commit/dc70c5a192
2019-09-05 18:42:49 +09:00
bronzdoc 68937fe0e4 [rubygems/rubygems] Make passing a gem name to be optional
https://github.com/rubygems/rubygems/commit/4ba4ffebbe
2019-09-05 18:42:41 +09:00
bronzdoc 95326150fa [rubygems/rubygems] Move build gem logic to its own method
https://github.com/rubygems/rubygems/commit/a16eacd650
2019-09-05 18:42:33 +09:00
David Rodríguez fea91d69a3 [rubygems/rubygems] Don't fail when `uninstall --all` with default gem
Instead, display an informative message saying that uninstallation of
specific versions is being skipped because of being default gems.

https://github.com/rubygems/rubygems/commit/b44845aa1d
2019-09-05 18:42:26 +09:00
Alexander Pakulov d84b9b6d0a [rubygems/rubygems] Use IAM role to extract security-credentials for EC2 instance
https://github.com/rubygems/rubygems/commit/9a401646e1
2019-09-05 18:41:58 +09:00
David Rodríguez d219be4a1c [rubygems/rubygems] Move empty check earlier
https://github.com/rubygems/rubygems/commit/fc224e9717
2019-09-05 18:41:49 +09:00
Shugo Maeda 633ae3278e
Add Net::FTP#features and Net::FTP#option
Patch by darkphnx (Dan Wentworth) .  Thanks!
[Feature #15964]
2019-09-02 14:43:51 +09:00
aycabta 85dc89c907 Treat Japanese IME on/off code correctly 2019-09-02 06:37:25 +09:00
aycabta e5dd63ba8c IRB 1.1.0.pre.3 2019-09-01 11:23:58 +09:00
aycabta 11d6094cbe Reline 0.0.2 2019-09-01 11:23:52 +09:00
aycabta c5bb074fe7 Re-calculate state variables of screen when screen size changes 2019-09-01 11:02:58 +09:00
aycabta d4eef04883 Use double splat for keyword args by a hash object in lib/un.rb 2019-08-31 20:55:35 +09:00
Jeremy Evans b5b3afadfa Fix a couple of bundler issues with keyword argument separation
There are more issues than this, but hopefully this is enough
to get make test-bundler passing in CI.
2019-08-30 12:39:31 -07:00
Jeremy Evans d08e1004e0 Fix keyword argument separation issues in lib
Mostly requires adding ** in either calls or method definitions.
2019-08-30 12:39:31 -07:00
Kazuhiro NISHIYAMA 998ee350b9
Revert "require 'pp' before use PP"
of lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb.
This reverts commit 500149709b partially.
2019-08-30 16:09:08 +09:00
Nobuyoshi Nakada 631db0de27
Removed debug print
It seems to be fixed by b870ca5879.
2019-08-30 16:00:18 +09:00
Kazuhiro NISHIYAMA b870ca5879
Add guard as same as `==`
Try to fix failure at https://github.com/ruby/ruby/runs/207580232#step:10:382
```
       undefined method `name' for "Gemfile.lock":String
       /home/runner/work/ruby/ruby/lib/bundler/resolver/spec_group.rb:65:in `eql?'
```
2019-08-30 12:49:27 +09:00
Yusuke Endoh c9fc82983c lib/pp.rb: Use UnboundMethod#bind_call instead of .bind(obj).call(...)
Related to [Feature #15955].
2019-08-30 11:13:00 +09:00
Kazuhiro NISHIYAMA 500149709b
require 'pp' before use PP
`Kernel#pp` has wrapper, but `PP` does not.

https://github.com/ruby/ruby/runs/207405029#step:10:141
`NameError: uninitialized constant Bundler::Molinillo::Resolver::Resolution::PP`
2019-08-30 10:21:50 +09:00
aycabta a39b26b594 Check events that console window size changed on Windows 2019-08-29 21:11:53 +09:00
aycabta 3a425c7623 Fix alignment of a SHORT variable
typedef struct _COORD {
  SHORT X;
  SHORT Y; // I wanted to take this...
} COORD, *PCOORD;

typedef struct _CONSOLE_SCREEN_BUFFER_INFO {
  COORD      dwSize;
  COORD      dwCursorPosition; // ...of this one
  WORD       wAttributes;      // But it's combined with first 2bytes of this
  SMALL_RECT srWindow;
  COORD      dwMaximumWindowSize;
} CONSOLE_SCREEN_BUFFER_INFO;

If wAttributes has non-zero value, the code breaks.
2019-08-29 21:05:19 +09:00
aycabta b74dd665c0 CONSOLE_SCREEN_BUFFER_INFO is 22bytes
typedef struct _CONSOLE_SCREEN_BUFFER_INFO {
  COORD      dwSize;              // 4(SHORT X, Y)
  COORD      dwCursorPosition;    // 4
  WORD       wAttributes;         // 2
  SMALL_RECT srWindow;            // 8(SHORT Left, Top, Right, Bottom)
  COORD      dwMaximumWindowSize; // 4
} CONSOLE_SCREEN_BUFFER_INFO;
2019-08-29 21:03:44 +09:00
aycabta 893900dc78 Add stub set_screen_size for other platforms 2019-08-29 15:21:00 +09:00
aycabta 0f405541bf Support SIGWINCH 2019-08-29 14:37:19 +09:00
aycabta e82719c651 Remove jquery.js from file list of rdoc.gemspec 2019-08-28 19:47:22 +09:00
Nobuyoshi Nakada a506b7f35a Adjusted indents and supplied last commas
Fixed unmatched indent of the closing bracket for
`:irb_current_working_workspace`, and adjusted following elements.
2019-08-28 16:08:14 +09:00
Kazuhiro NISHIYAMA 989e8ad322
Remove debug print [ci skip] 2019-08-28 10:34:56 +09:00
aycabta f308ab2131 Remove jquery.js 2019-08-28 01:12:14 +09:00
aycabta d8fa88294f Version 6.2.0 2019-08-28 00:48:12 +09:00
aycabta 39810b4035 Good bye jQuery 2019-08-28 00:48:12 +09:00
aycabta 744be55fad Remove duplicated delegation 2019-08-27 06:30:32 +09:00
aycabta fd0a4a64a3 Delegete an instance method to a class method correctly 2019-08-27 05:59:56 +09:00
aycabta f13db4adde Save value to @ambiguous_width because of a accessor 2019-08-27 05:33:27 +09:00
aycabta f2a5c50f94 The "private" doesn't make sence for class methods and a constant 2019-08-27 05:18:51 +09:00
aycabta 68207bb4fc Use preposing "private" to define methods 2019-08-27 05:18:51 +09:00
aycabta d8bcede9c3 Adjust method forwardings of Reline 2019-08-27 05:18:46 +09:00
manga_osyo 344f507e4e Remove .freeze. 2019-08-27 01:23:50 +09:00
manga_osyo 195f545c14 Fix `Reline::Windows`. 2019-08-27 01:23:24 +09:00
manga_osyo 298ac04710 Refactoring Reline. 2019-08-27 01:23:19 +09:00
manga_osyo f60e5a1f99 Remove test_mode in `lib/reline`. 2019-08-27 01:23:10 +09:00
manga_osyo 9c0cd6a09e Refactoring Reline accessor. 2019-08-27 01:23:04 +09:00
Jeremy Evans 7d9c3a5712 Handle binding.irb for frozen objects and BasicObjects using a delegate
Fixes Ruby Bug 13264
2019-08-27 00:10:34 +09:00
Jeremy Evans caeafbe825 Move private call without arguments inside method
This code did not have the desired effect.  I'm not sure if
irb_binding is supposed to be private or not.  If not, the private
call can just be removed.
2019-08-27 00:10:34 +09:00
Yusuke Endoh 6944a1aa4f lib/webrick.rb: use require_relative for webrick/utils.rb
`require "webrick/utils.rb"` should load `lib/webrick/utils.rb`, but on
some CI machines, it wrongly loads `test/webrick/utils.rb`, which caused
circular require warning:

https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20190825T093007Z.log.html.gz
```
/data/chkbuild/tmp/build/20190825T093007Z/ruby/lib/rubygems/core_ext/kernel_require.rb:61: warning: /data/chkbuild/tmp/build/20190825T093007Z/ruby/lib/rubygems/core_ext/kernel_require.rb:61: warning: loading in progress, circular require considered harmful - /data/chkbuild/tmp/build/20190825T093007Z/ruby/lib/webrick.rb
```
2019-08-25 19:29:52 +09:00
aycabta 800821831d Always check multiline termination 2019-08-22 06:02:27 +09:00
Fernando Wolf Bona 8d804e41a0 Add abs to Matrix (#2199) 2019-08-21 16:36:39 -04:00
aycabta 48fdc37ad5 IRB's multiline history is enable only when Reidline mode 2019-08-22 05:09:08 +09:00
Nobuyoshi Nakada 4419b5dbc2
The investigation is going on... 2019-08-21 13:31:22 +09:00
David Rodríguez 5ea08883cf
[bundler/bundler] Remove old rubies stuff no longer needed
https://github.com/bundler/bundler/commit/36fb3287f4
2019-08-21 07:58:46 +09:00
Akira Matsuda 9557069299
Avoid creating Hash objects per each mon_synchronize call (#2393) 2019-08-20 22:08:41 +09:00
Nobuyoshi Nakada 73af1c4d00 [rubygems/rubygems] Use `RbConfig::CONFIG['rubylibprefix']`
It is defined since ruby 1.9.2.

https://github.com/rubygems/rubygems/commit/84981ca908
2019-08-20 17:00:13 +09:00
David Rodríguez 5a384e2c08 Fix some bundler specs (#2380)
* These seem to consistenly pass already

* Show actual command when running `make test-bundler`

Current the setup command that installs the necessary gems for testing
bundler was printed, but not the actual command that runs the tests.
That was a bit confusing.

* Borrow trick from setproctitle specs

* A title that long doesn't get set sometimes

No idea why, but the test doesn't need that the title is that long.

* Fix most gem helper spec ruby-core failures

* Fix the rest of the gem helper failures

* Fix version spec by improving the assertion

* Remove unnecessary `BUNDLE_RUBY` environment var

We can use `RUBY` when necessary, and `BUNDLE_RUBY` is not a good name
because bundler considers `BUNDLE_*` variables as settings.

* Rename `BUNDLE_GEM` to `GEM_COMMAND`

This is more descriptive I think, and also friendlier for bundler
because `BUNDLE_` env variables are interpreted by bundler as settings,
and this is not a bundler setting.

This fixes one bundler spec failure in config specs against ruby-core.

* Fix quality spec when run in core

Use the proper path helper.

* Fix dummy lib builder to never load default gems

If a dummy library is named as a default gem, when requiring the library
from its executable, the default gem would be loaded when running from
core, because in core all default gems share path with bundler, and thus
they are always in the $LOAD_PATH. We fix the issue by loading lib
relatively inside dummy lib executables.

* More exact assertions

Sometimes I have the problem that I do some "print debugging" inside
specs, and suddently the spec passes. This happens when the assertion is
too relaxed, and the things I print make it match, specially when they
are simple strings like "1.0" than can be easily be part of gem paths
that I print for debugging.

I fix this by making a more exact assertion.

* Detect the correct shebang when ENV["RUBY"] is set

* Relax assertion

So that the spec passes even if another paths containing "ext" are in
the load path. This works to fix a ruby-core issue, but it's a better
assertion in general. We just want to know that the extension path was
added.

* Use folder structure independent path helper

It should fix this spec for ruby-core.

* Fix the last failing spec on ruby-core

* Skip `bundle open <default_gem>` spec when no default gems
2019-08-20 09:46:31 +09:00
aycabta aa03de8ba1 Treat two types "do" correctly
A "do" what has followed a token what has EXPR_CMDARG is for a block,
and in other cases "do" is for "while", "until" or "for".
2019-08-20 08:31:02 +09:00
Hiroshi SHIBATA 355acbafde
Update the canonical repository url 2019-08-19 17:52:20 +09:00
Nobuyoshi Nakada 45454bdb8b
Prefer Regexp#=~ to Regexp#match when the RHS may be nil 2019-08-19 16:39:42 +09:00
Yusuke Endoh bc1e2271af lib/rdoc/markup/parser.rb: remove a unused variable initialization 2019-08-19 10:07:05 +09:00
David Rodríguez 683f9e1dbf [bundler/bundler] No need to activate the `fileutils` default gem
The version we're vendoring actually relaxed this restriction back to
2.3.0+, so we can always use the vendored version.

https://github.com/bundler/bundler/commit/d366cbfe5d
2019-08-18 13:45:45 +09:00
David Rodríguez 998204882b [bundler/bundler] Last relative requires
https://github.com/bundler/bundler/commit/fb587b9ebb
2019-08-18 13:44:56 +09:00
David Rodríguez 7659f00a8d [bundler/bundler] Move local variable to only branch where it's used
https://github.com/bundler/bundler/commit/3995b3345d
2019-08-18 13:44:36 +09:00
Zehan Zhao d80f5399ad [bundler/bundler] Fix open default gem error
https://github.com/bundler/bundler/commit/792d724752
2019-08-18 13:44:26 +09:00
David Rodríguez cc644c7116 [bundler/bundler] Fix `bundle doctor` command
Previously `bundle doctor` would fail on any bundle that does not
include git gems or plugins. This is because the previously used
`Bundler.home` does not exist unless the bundle includes git gems or
plugins. For example, with `bundle config set path .bundle`, it points
to which does not exist unless this kind of gems exist in the Gemfile.

The name `Bundler.home` is really unfortunate, it should probably be
have more descriptive name, and be private. But for now I just want to
make `bundle doctor` usable.

https://github.com/bundler/bundler/commit/5531a18c1e
2019-08-18 13:44:03 +09:00
David Stosik a02dbcecb1 [bundler/bundler] Bundler displays a duplicate gem entries warning even if gems only appear once per group
https://github.com/bundler/bundler/commit/d18a83109e
2019-08-18 13:43:59 +09:00
aycabta 113a5c1e1d The "exe" dir doesn't exist in this repostiroy 2019-08-18 08:05:08 +09:00
Alan Wu e9f82585ee Don't crash when deleting at the end of the line
To reproduce this bug, type one character into irb, then press the
delete key on your keyboard.
2019-08-18 07:43:19 +09:00
Nobuyoshi Nakada 8b8e7e6e9e
$LOAD_PATH elements should be real paths
Installed path may contain symbolic links.
2019-08-18 00:32:21 +09:00
aycabta 2a65498ca2 Remove CI files from list 2019-08-17 20:20:04 +09:00
Hiroshi SHIBATA e095803c37 Removed formatter_test_case and text_formatter_test_case from Gem::Specification#files. 2019-08-17 20:20:04 +09:00
Hiroshi SHIBATA 3a06c11a7d Removed autoload from Markup. 2019-08-17 20:20:04 +09:00
Hiroshi SHIBATA 79fe84edf5 Removed test_case files from lib directory. 2019-08-17 20:20:04 +09:00
David Rodríguez 6357540945
[bundler/bundler] Fix bundle bin location in core repo
https://github.com/bundler/bundler/commit/9437568ab4
2019-08-17 17:08:49 +09:00
Hiroshi SHIBATA 7664b5cb65
Support the current stable version of Ruby like 2.5 and 2.6. 2019-08-17 17:06:36 +09:00
Hiroshi SHIBATA 221ba9b66c
Revert "`Gem.load_path_insert_index always returns non-nil index after Ruby 1.9"
This reverts commit 260ef51a73.

  This broke the stable versions of Ruby like 2.4 and 2.5
2019-08-17 17:01:23 +09:00
Hiroshi SHIBATA d041c6cebb
Added comments for extended require by RubyGems 2019-08-17 15:12:46 +09:00
Hiroshi SHIBATA 260ef51a73
`Gem.load_path_insert_index always returns non-nil index after Ruby 1.9 2019-08-17 15:12:46 +09:00
Hiroshi SHIBATA d8148650f6
Try to continue on LoadError with gem_original_require 2019-08-17 15:12:46 +09:00
Hiroshi SHIBATA 22d9bd944d
Keep the existance behavior with symlink path 2019-08-17 15:12:45 +09:00
Hiroshi SHIBATA dd16f8524c
Revert "Revert "[rubygems/rubygems] [Require] Ensure -I beats a default gem""
This reverts commit 75d29db8f9.
2019-08-17 15:12:45 +09:00
Kazuhiro NISHIYAMA ccbfb054b1
Fix typos 2019-08-17 13:57:12 +09:00
Hiroshi SHIBATA 75d29db8f9
Revert "[rubygems/rubygems] [Require] Ensure -I beats a default gem"
This reverts commit 00cd5d74ce.
2019-08-17 08:52:39 +09:00
Hiroshi SHIBATA 7624154595
Fixed Insecure Operation in require
Caused by 00cd5d74ce
2019-08-17 08:44:31 +09:00
Hiroshi SHIBATA ae3002b540
[rubygems/rubygems] Fixup #2844
https://github.com/rubygems/rubygems/commit/5924286ae2
2019-08-17 07:35:49 +09:00