Age | Commit message (Collapse) | Author |
|
|
|
Instead of building messages separately.
|
|
```
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
```
Notes:
Merged: https://github.com/ruby/ruby/pull/2561
|
|
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]
Notes:
Merged: https://github.com/ruby/ruby/pull/2572
|
|
Fixes [Bug #10314]
Notes:
Merged: https://github.com/ruby/ruby/pull/2569
|
|
File.extname now returns a dot string at a name ending with a dot.
[Bug #15267]
Notes:
Merged: https://github.com/ruby/ruby/pull/2565
|
|
* {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.
Notes:
Merged: https://github.com/ruby/ruby/pull/2554
|
|
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]
Notes:
Merged: https://github.com/ruby/ruby/pull/2554
|
|
inside method
Calling these methods without an argument does not have the
desired effect inside a method.
Fixes [Bug #13249]
Notes:
Merged: https://github.com/ruby/ruby/pull/2562
|
|
Still some CIs are failing:
https://ci.appveyor.com/project/ruby/ruby/builds/28141041/job/v4hfc99sjefqabkk
http://ci.rvm.jp/results/trunk-vm-asserts@silicon-docker/2317313
I'll fix them later.
|
|
|
|
|
|
|
|
|
|
When ruby2_keywords is used on a method, keywords passed to the method
are flagged. When the hash is passed as the last element of an
argument splat to another method, the hash should be treated as a
keyword splat. When keyword splatting a hash, a duplicate of the
hash is made. So when auto-splatting the hash with the keyword
flag, a duplicate of the hash should also be made.
This fixes cases where the hash is later passed to another method
and would be treated as keywords there:
class Object
ruby2_keywords def foo(*a) bar(*a) end
def bar(*a) baz(*a) end
def baz(*a, **kw) [a, kw] end
end
foo(:a=>1)
Previously, this would pass the :a=>1 as keywords to bar and also as
keywords to baz. Now it only passes :a=>1 as keywords to bar, but bar
passes :a=>1 as a positional hash to baz (which in this case
generates a warning in 2.7).
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2556
|
|
of "setting Encoding.default_internal".
|
|
https://github.com/rubygems/rubygems/commit/97e9768612
|
|
https://rubyci.org/logs/rubyci.s3.amazonaws.com/openbsd-current/ruby-master/log/20191015T070011Z.fail.html.gz
```
1) Failure:
TestProcess#test_kill_at_spawn_failure [/home/chkbuild/chkbuild/tmp/build/20191015T070011Z/ruby/test/ruby/test_process.rb:2276]:
[ruby-core:69304] [Bug #11166].
<#<Thread:0x000009f60a7cac40@/home/chkbuild/chkbuild/tmp/build/20191015T070011Z/ruby/test/ruby/test_process.rb:2272 dead>> expected but was
<nil>.
``
|
|
[Bug #16250]
|
|
https://github.com/flori/json/commit/565c72ba9e
|
|
flori/json@c34d01ff6a18dac04a90b2e0f820cdb1d5c7e1b2 does not
consider US-ASCII compatible but non-UTF-8 encodings, and causes
an error in RDoc tests.
https://github.com/flori/json/commit/4f471bf590
|
|
* 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]
|
|
Notes:
Merged-By: kou <kou@clear-code.com>
|
|
Notes:
Merged-By: kou <kou@clear-code.com>
|
|
Notes:
Merged-By: kou <kou@clear-code.com>
|
|
On Android, nl_langinfo() always returns UTF-8 even when LANG is C.
|
|
On Android 28, LOG_PERROR is defined, but not implemented yet.
This change skips Syslog#log explicitly.
|
|
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]
Notes:
Merged: https://github.com/ruby/ruby/pull/2546
|
|
The root directory may be owned by the current user, for example, in
chroot environment.
|
|
|
|
|
|
* ext/openssl/ossl_asn1.c (Init_ossl_asn1): register the static
variable to grab an internal object, before creating the object.
otherwise the just-created object could get collected during the
global variable list allocation. [Bug #16196]
|
|
https://gist.github.com/ko1/a88834d744a0682711dab53fd9015a04#file-brlog-trunk-nopara-20191005-235153-L393-L472
https://github.com/rubygems/rubygems/commit/707408d8e7
|
|
https://github.com/rubygems/rubygems/commit/1bd77f53df
|
|
* parse.y (struct local_vars): moved numbered parameter NODEs for
nesting check to separate per local variable scopes, as numbered
parameters should belong to local variable scopes. [Bug #16248]
|
|
Fixes [Bug #11275]
Notes:
Merged: https://github.com/ruby/ruby/pull/2535
|
|
`8 * RbConfig::SIZEOF` ... is not straight.
|
|
Sync to ruby/bigdecimal@92356ba71c6bd325b0ab618c634a7aecf8cdc767
Notes:
Merged-By: mrkn <mrkn@ruby-lang.org>
|
|
There are libraries that use define_method with argument splats
where they would like to pass keywords through the method. To
more easily allow such libraries to use ruby2_keywords to handle
backwards compatibility, it is necessary for ruby2_keywords to
support bmethods.
Notes:
Merged: https://github.com/ruby/ruby/pull/2532
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2533
|
|
|
|
This reverts commit f62f90367fc3bce6714e7c34cbd040e14e43fe07.
|
|
This is follow up of r67315.
|
|
|
|
This reverts commits:
* 2a490d5660ac869f8f2bbcec4887b1dc2950643f
Suppress assert_match warnings.
* d4a86e407ec2057c2c7ad757aa76dad757f34c3a
Assert warnings message for the last argument is keyword parameter.
|
|
https://bugs.ruby-lang.org/issues/16189
https://github.com/rubygems/rubygems/commit/e331222163
|
|
https://github.com/rubygems/rubygems/commit/05146bb2fd
|