aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* st: Do error check only on non-RubyK.Takata2019-10-211-0/+16
|
* st: Add NULL checkingK.Takata2019-10-211-2/+26
| | | | These are found by Coverity.
* 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.
* test/optparse/test_did_you_mean.rb - fix suggestion orderMSP-Greg2019-10-211-3/+3
|
* DidYouMean can be an empty stub module [Bug #16263]Nobuyoshi Nakada2019-10-211-1/+1
|
* * 2019-10-21 [ci skip]git2019-10-211-1/+1
|
* test_exception - fix with & w/o did_you_meanMSP-Greg2019-10-211-2/+5
| | | | See Ruby issue 16263
* Also BDOT2 and BDOT3 are operatorsNobuyoshi Nakada2019-10-201-0/+2
|
* show BASERUBY version at configure.Koichi Sasada2019-10-201-0/+3
|
* Native MonitorMixin::ConditionVariable#waitKoichi Sasada2019-10-202-22/+43
| | | | | MonitorMixin::ConditionVariable#wait can be interrupted just after Monitor#exit_for_cond. So implementation in C.
* delegate synchronize methodKoichi Sasada2019-10-201-6/+1
| | | | | | | | Delegate MonitorMixin#synchronize body to Monitor#synchronize. It makes guarantee interrupt safe (because Monitor#synchronize is written in C). I thought Ruby implementation is also safe, but I got stuck failure <http://ci.rvm.jp/results/trunk_test@P895/2327639> so that I introduce this fix to guarantee interrupt safe.
* make monitor.so for performance. (#2576)Koichi Sasada2019-10-206-79/+250
| | | | | | | | | | | | | | | 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 [ci skip]git2019-10-201-1/+1
|
* Fixed a typo [ci skip]Nobuyoshi Nakada2019-10-201-1/+1
|
* Extend Ripper DSL to set to pseudo variables other than `$$`Nobuyoshi Nakada2019-10-191-4/+6
|
* appveyor.yml - MinGW - update for MSYS2 / Mingw-w64 (#2573)MSP-Greg2019-10-181-1/+3
| | | | | MSYS source code comes from both gcc.gnu.org & Mingw-w64. Updates to the Mingw-w64 source broke the MinGW build step. Fixes the issue until Mingw-w64 updates their source, then it should be reverted, see comments in code.
* * 2019-10-19 [ci skip]git2019-10-191-1/+1
|
* Fixed passing idNil as a SymbolNobuyoshi Nakada2019-10-191-8/+8
|
* Verbatim texts need more indent [ci skip]Nobuyoshi Nakada2019-10-181-12/+16
| | | | And separate ruby script and executed example.
* Use `_` instead of `_n_`Kazuhiro NISHIYAMA2019-10-181-1/+1
|
* NEWS: Mention that optparse now supports did_you_mean for unknown optionYusuke Endoh2019-10-181-0/+17
|
* Support DidYouMean by AmbiguousOption tooNobuyoshi Nakada2019-10-182-2/+9
|
* Defer adding additional info until getting the message of an errorNobuyoshi Nakada2019-10-181-13/+20
|
* Default DidYouMean.formatter to PlainFormatterNobuyoshi Nakada2019-10-181-1/+5
|
* Added no suggestion test caseNobuyoshi Nakada2019-10-181-0/+5
|
* Use DidYouMean.formatterNobuyoshi Nakada2019-10-182-8/+19
| | | | Instead of building messages separately.
* Suppress numbered parameter warningsNobuyoshi Nakada2019-10-181-1/+1
|
* Make weakmap finalizer an ifunc lambdaNobuyoshi Nakada2019-10-181-3/+3
| | | | | | | | | | | | | Simple comparison between proc/ifunc/method invocations: ``` proc 15.209M (± 1.6%) i/s - 76.138M in 5.007413s ifunc 15.195M (± 1.7%) i/s - 76.257M in 5.020106s method 9.836M (± 1.2%) i/s - 49.272M in 5.009984s ``` As `proc` and `ifunc` have no significant difference, chosen the latter for arity check.
* Use identhash as WeakMapNobuyoshi Nakada2019-10-182-3/+6
| | | | | As ObjectSpace::WeakMap allows FLONUM as a key, needs the special deal for its hash. [Feature #16035]
* lib/optparse.rb: Show a did_you_mean hint for unknown optionYusuke Endoh2019-10-182-2/+38
| | | | | | | | | | | | | | | | | | | | ``` 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
|
* Remove unused constant.Aaron Patterson2019-10-171-2/+1
| | | | This constant isn't used, so lets remove it.
* Look up constant instead of caching in a globalAaron Patterson2019-10-172-6/+40
| | | | | The global can go bad if the compactor runs, so we need to look up the constant instead of caching it in a global.
* Update test to handle x32 ABI compiled Ruby on LinuxJeremy Evans2019-10-171-0/+1
| | | | | | Suggestion from Laurence Parry. Fixes [Bug #16030]
* 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.
* Make circular argument reference a SyntaxError instead of a warningJeremy Evans2019-10-175-54/+99
| | | | Fixes [Bug #10314]
* * 2019-10-18 [ci skip]git2019-10-181-1/+1
|
* Insert multiline incremental search result correctlyaycabta2019-10-181-3/+18
|
* [DOC] no change on Windows [Bug #15267] [ci skip]Nobuyoshi Nakada2019-10-172-3/+6
|
* Fixed File.extname at a name ending with a dotNobuyoshi Nakada2019-10-175-10/+30
| | | | | File.extname now returns a dot string at a name ending with a dot. [Bug #15267]
* * remove trailing spaces. [ci skip]git2019-10-171-1/+1
|
* Regexp#match{?} with nil raises TypeError as String, Symbol (#1506)Kenichi Kamiya2019-10-175-15/+41
| | | | | | | | | | | | | | | | | | | | | | | * {String|Symbol}#match{?} with nil returns falsy To improve consistency with Regexp#match{?} * String#match(nil) returns `nil` instead of TypeError * String#match?(nil) returns `false` instead of TypeError * Symbol#match(nil) returns `nil` instead of TypeError * Symbol#match?(nil) returns `false` instead of TypeError * Prefer exception * Follow empty ENV * Drop outdated specs * Write ruby/spec for above https://github.com/ruby/ruby/pull/1506/files#r183242981 * Fix merge miss
* 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-162-8/+16
| | | | | | | | 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-162-0/+17
| | | | | | | | | 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]