aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Make suggestions order stable [Bug #16263]Nobuyoshi Nakada2019-10-211-1/+1
| | | | | As the result order of `DidYouMean::SpellChecker#correct` is undefined, keep the order of the original candidates.
* make monitor.so for performance. (#2576)Koichi Sasada2019-10-201-323/+0
| | | | | | | | | | | | | | | 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.
* Support DidYouMean by AmbiguousOption tooNobuyoshi Nakada2019-10-181-2/+3
|
* Defer adding additional info until getting the message of an errorNobuyoshi Nakada2019-10-181-13/+20
|
* Use DidYouMean.formatterNobuyoshi Nakada2019-10-181-1/+1
| | | | Instead of building messages separately.
* lib/optparse.rb: Show a did_you_mean hint for unknown optionYusuke Endoh2019-10-181-2/+16
| | | | | | | | | | | | | | | | | | | | ``` 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 ```
* Fix warning of generated parser for nested moduleSeiei Miyagi2019-10-171-1/+1
|
* Treat key sequences from getwch() that start from 0 or 0xE0 correctlyaycabta2019-10-181-0/+6
|
* Add numeric keypad key sequences on Windowsaycabta2019-10-181-0/+7
|
* Remove freezeaycabta2019-10-183-3/+3
|
* Ignore the input method key sequence from getwch() correctlyaycabta2019-10-181-1/+2
| | | | | | | | 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.
* Insert multiline incremental search result correctlyaycabta2019-10-181-3/+18
|
* Remove unused variableaycabta2019-10-171-1/+0
|
* Refactor prompt generation logicaycabta2019-10-171-34/+17
|
* Use `\&` instead of `\1` with captureKazuhiro NISHIYAMA2019-10-171-1/+1
|
* Fix DRbServer#any_to_sJeremy Evans2019-10-161-8/+2
| | | | | | | | My previous fix in d0ed935d5bf8c3fce9800742a36e44fb7f63dda4 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.
* Do not raise an exception on a closed DRb socketJeremy Evans2019-10-161-0/+2
| | | | | | | | | 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]
* Handle subclasses of Exception in drbJeremy Evans2019-10-161-1/+3
| | | | | | | | | | | 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]
* Calculate prompt width correctlyaycabta2019-10-171-7/+9
|
* Collect multiline prompt logic into a methodaycabta2019-10-171-35/+17
|
* Support multiline history in incremental searchaycabta2019-10-161-3/+17
|
* Support backspace in incremental searchaycabta2019-10-161-1/+1
|
* C-r is incremental history search in vi insert modeaycabta2019-10-161-1/+1
|
* Fixed the key to delete [Bug #16250]Nobuyoshi Nakada2019-10-151-1/+1
| | | | | | https://github.com/ruby/ruby/commit/f94202fcc228d0348ca050a7b18a8f8a538a7305#commitcomment-35505076 Co-Authored-By: Ary Borenszweig <asterite@gmail.com>
* [rubygems/rubygems] Bump version to 3.1.0.pre2Hiroshi SHIBATA2019-10-151-1/+1
| | | | https://github.com/rubygems/rubygems/commit/a7a673ce22
* Use compare_by_identity hash [Bug #16250]Nobuyoshi Nakada2019-10-151-3/+3
|
* Simplify circular reference check of IRB::ColorTakashi Kokubun2019-10-141-16/+14
|
* IRB colorize: take into account recursive arrays and hashes (#2555)Ary Borenszweig2019-10-141-4/+18
| | | [Bug #16250]
* add require "monitor"Masatoshi SEKI2019-10-141-0/+1
|
* Automatically close fds on fork (and GC). The connection pools are ↵Masatoshi SEKI2019-10-141-24/+76
| | | | maintained at thread scope.
* Fix some DRb issues (#2552)Jeremy Evans2019-10-141-17/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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]
* Import CSV 3.1.2 (#2547)Sutou Kouhei2019-10-127-428/+511
|
* Import REXML 3.2.3 (#2548)Sutou Kouhei2019-10-122-1/+2
|
* Use `bind_call` instead of `bind` and `call`Kazuhiro NISHIYAMA2019-10-112-2/+2
|
* set real path to __FILE__ and __dir__ in Binding#irbtakkanm2019-10-111-1/+3
| | | | When reading Binding#irb, the file of the calling source is reflected in __FILE__ and __dir__.
* Support delegates for BasicObjectJeremy Evans2019-10-101-4/+14
| | | | | | | | | 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]
* [rubygems/rubygems] Optimize Gem::Package::TarReader#eachJean Boussier2019-10-101-9/+15
| | | | https://github.com/rubygems/rubygems/commit/1de8f39ac4
* Remove uselsess shebangPavel Valena2019-10-091-1/+0
| | | as the file is not executable anyway.
* Update required_ruby_version to 2.4.0aycabta2019-10-091-1/+1
|
* Check for invalid hex escapes in URI#query=Jeremy Evans2019-10-081-0/+1
| | | | Fixes [Bug #11275]
* Version 0.0.3aycabta2019-10-071-1/+1
|
* Flush console just after printingaycabta2019-10-071-0/+2
|
* Use built-in Win32API on JRubyaycabta2019-10-071-33/+37
| | | | It's fixed for JRuby dedicatedly.
* [rubygems/rubygems] Use dependency.identity in available_specsbronzdoc2019-10-051-12/+1
| | | | https://github.com/rubygems/rubygems/commit/bde88f00a1
* [rubygems/rubygems] Add Gem::Dependency#identity methodbronzdoc2019-10-051-0/+14
| | | | https://github.com/rubygems/rubygems/commit/05146bb2fd
* [rubygems/rubygems] Always pass an encoding option to Zlib::GzipReader.wrapNobuyoshi Nakada2019-10-051-5/+1
| | | | | | | | 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
* WEBrick: prevent response splitting and header injectionYusuke Endoh2019-10-011-1/+2
| | | | | | | | This is a follow up to d9d4a28f1cdd05a0e8dabb36d747d40bbcc30f16. The commit prevented CRLR, but did not address an isolated CR or an isolated LF. Co-Authored-By: NARUSE, Yui <naruse@airemix.jp>
* Loop with String#scan without creating substringsNobuyoshi Nakada2019-10-011-17/+2
| | | | | Create the substrings necessary parts only, instead of cutting the rest of the buffer. Also removed a useless, probable typo, regexp.
* Warn for URI.{,un}{escape,encode}, even if not in verbose modeJeremy Evans2019-09-271-2/+2
| | | | | | | | 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]
* Fix fallback in URI.encode_www_form_component to include #Jeremy Evans2019-09-271-1/+1
| | | | | | Patch from Matthew Kerwin. Fixes [Bug #14358]