| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This reverts commit fa8ac91e957a076f6df1adaecad7896817138009.
Previous behavior is intentional.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fiber#transfer previously made it impossible to resume the fiber
if it was transferred to (no resuming the target of Fiber#transfer).
However, the documentation specifies that you cannot resume a fiber
that has transferred to another fiber (no resuming the source of
Fiber#transfer), unless control is transferred back.
Fix the code by setting the transferred flag on the current/source
fiber, and unsetting the transferred flag on the target fiber.
Fixes [Bug #9664]
Fixes [Bug #12555]
|
| |
|
|
|
|
|
| |
`Integer.sqrt(0xffff_ffff_ffff_ffff ** 2)` caused assertion failure
because of integer overflow. [ruby-core:95453] [Bug #16269]
|
| |
|
| |
|
|
|
|
| |
See Ruby issue 16263
|
|
|
|
|
|
| |
Suggestion from Laurence Parry.
Fixes [Bug #16030]
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
inside method
Calling these methods without an argument does not have the
desired effect inside a method.
Fixes [Bug #13249]
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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>.
``
|
|
|
|
| |
On Android, nl_langinfo() always returns UTF-8 even when LANG is C.
|
|
|
|
|
| |
The root directory may be owned by the current user, for example, in
chroot environment.
|
|
|
|
|
|
| |
* 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]
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
This reverts commit f62f90367fc3bce6714e7c34cbd040e14e43fe07.
|
|
|
| |
This is follow up of r67315.
|
|
|
|
|
|
| |
return directly in class/module is an error, so return in
proc in class/module should also be an error. I believe the
previous behavior was an unintentional oversight during the
addition of top-level return in 2.4.
|
|
|
|
| |
RUBY_ISEQ_DUMP_DEBUG=to_binary and the attached test case was failing.
Dump the flag to make sure `**nil` can round-trip properly.
|
|
|
|
|
| |
* dir.c (file_s_fnmatch): ensure that pattern does not contain a
NUL character. https://hackerone.com/reports/449617
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Currently, there is not a way to create a sized enumerator in C
with a different set of arguments than provided by Ruby, and
correctly handle keyword arguments. This function allows that.
The need for this is fairly uncommon, but it occurs at least in
Enumerator.produce, which takes arugments from Ruby but calls
rb_enumeratorize_with_size with a different set of arguments.
|
|
|
|
| |
by explicitly removing the old definition.
|
| |
|
| |
|
|
|
|
|
|
|
| |
chkbuild (CI process) shows methods list before
running tests and sometimes it can fails. This
commit a code part to emulate this method listing
feature.
|
|
|
|
|
|
| |
* numeric.c (num_step): pass the extracted argument from keyword
argument, not the last argument itself which should have been
warned already.
|
|
|
|
|
|
|
|
|
|
| |
This is due to calling rb_mod_module_eval directly instead of using
rb_funcall_passing_block.
The problem with calling directly is it does not create a new VM
frame, so rb_mod_module_eval was called with no arguments, but with
the keyword given VM frame flag set, which causes problems
internally.
|
|
|
|
|
|
|
| |
If a method accepts no keywords and was called with a keyword, an
ArgumentError was not always issued previously. Force methods that
accept no keywords to go through setup_parameters_complex so that
an ArgumentError is raised if keywords are provided.
|
|
|
|
|
| |
Drop catch table entries used in eliminated block, as well as
call_infos. [Bug #16184]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes instance_exec and similar methods. It also fixes
Enumerator::Yielder#yield, rb_yield_block, and a couple of cases
with Proc#{<<,>>}.
This support requires the addition of rb_yield_values_kw, similar to
rb_yield_values2, for passing the keyword flag.
Unlike earlier attempts at this, this does not modify the rb_block_call_func
type or add a separate function type. The functions of type
rb_block_call_func are called by Ruby with a separate VM frame, and we can
get the keyword flag information from the VM frame flags, so it doesn't need
to be passed as a function argument.
These changes require the following VM functions accept a keyword flag:
* vm_yield_with_cref
* vm_yield
* vm_yield_with_block
|
|
|
|
| |
This commit adds compaction support to `rb_ast_t`.
|
|
|
|
| |
This requires adding rb_proc_call_kw to pass the keyword flag.
|
| |
|
| |
|
| |
|