| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
These are found by Coverity.
|
|
|
|
|
| |
As the result order of `DidYouMean::SpellChecker#correct` is
undefined, keep the order of the original candidates.
|
| |
|
| |
|
| |
|
|
|
|
| |
See Ruby issue 16263
|
| |
|
| |
|
|
|
|
|
| |
MonitorMixin::ConditionVariable#wait can be interrupted just after
Monitor#exit_for_cond. So implementation in C.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
And separate ruby script and executed example.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Instead of building messages separately.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
As ObjectSpace::WeakMap allows FLONUM as a key, needs the special
deal for its hash. [Feature #16035]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
```
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
```
|
| |
|
|
|
|
| |
This constant isn't used, so lets remove it.
|
|
|
|
|
| |
The global can go bad if the compactor runs, so we need to look up the
constant instead of caching it in a global.
|
|
|
|
|
|
| |
Suggestion from Laurence Parry.
Fixes [Bug #16030]
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Fixes [Bug #10314]
|
| |
|
| |
|
| |
|
|
|
|
|
| |
File.extname now returns a dot string at a name ending with a dot.
[Bug #15267]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* {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
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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]
|