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

7643 Коммитов

Автор SHA1 Сообщение Дата
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