Age | Commit message (Collapse) | Author |
|
This test invokes GC.start 100 times, which takes approx. six minutes in
Solaris. This change runs the test in a separated process, which makes
GC.start faster.
|
|
When a string is #frozen, it's capacity is resized to fit (if it is much
larger), since we know it will no longer be mutated.
> puts ObjectSpace.dump(String.new("a"*30, capacity: 1000))
{"type":"STRING", "class":"0x7feaf00b7bf0", "bytesize":30, "capacity":1000, "value":"...
> puts ObjectSpace.dump(String.new("a"*30, capacity: 1000).freeze)
{"type":"STRING", "class":"0x7feaf00b7bf0", "frozen":true, "bytesize":30, "value":"...
(ObjectSpace.dump doesn't show capacity if capacity is equal to bytesize)
Previously, if we dedup into an fstring, using String#-@, capacity would
not be reduced.
> puts ObjectSpace.dump(-String.new("a"*30, capacity: 1000))
{"type":"STRING", "class":"0x7feaf00b7bf0", "frozen":true, "fstring":true, "bytesize":30, "capacity":1000, "value":"...
This commit makes rb_fstring call rb_str_resize, the same as
rb_str_freeze does.
Closes: https://github.com/ruby/ruby/pull/2256
|
|
Still timeout occurs. Retry for 5dd8fdd3f328f741fae4abba00c478e8a51d2a7e.
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-master/log/20190625T032405Z.fail.html.gz
|
|
|
|
Currently the elements of a hash are revived before any ivar values.
This causes an issue when the `[]=` method references an instance
variable.
|
|
This commit allows exception backtraces to round trip
|
|
IO.seek on a pipe on Windows raises Errno::EINVAL instead of
Errno::ESPIPE.
Fixes Ruby Bug #15199
|
|
|
|
|
|
Remove extraneous spaces after the status code that is
non-compliant with RFC, i.e `HTTP 200 OK `, to unnecessary
confusion for WEBrick users, by a risk that WEBrick instances in
the wild will have server responses flagged as suspicious or
malicious due to a similar bug in [Cobalt Strike
misconfiguration].
Reported by Matt Tennis <mtennis@paloaltonetworks.com>
[Cobalt Strike misconfiguration]: https://blog.fox-it.com/2019/02/26/identifying-cobalt-strike-team-servers-in-the-wild/
|
|
Closes: https://github.com/ruby/ruby/pull/2251
|
|
[Bug #14194]
|
|
[Bug #14194]
|
|
[Bug #14194]
|
|
|
|
Fixes [Bug #15951]
Closes: https://github.com/ruby/ruby/pull/2250
|
|
* gc.c (wmap_aset): bypass check for frozen and allow frozen
object in WeakMap. [Bug #13498]
|
|
* test/lib/minitest/unit.rb (MiniTest::Assertions.diff): use
`EXEEXT` configured value instead of switching by hard coded
`host_os`.
|
|
* test/lib/test/unit/assertions.rb (assert_join_threads): kill and
show timed out threads.
|
|
* test/lib/minitest/unit.rb (MiniTest::Assertions#mu_pp_for_diff):
do not expand escaped backslash followed by 'n'.
|
|
|
|
Fixes [Bug #15949]
|
|
[Feature #15777]
Closes: https://github.com/ruby/ruby/pull/2173
|
|
|
|
|
|
|
|
|
|
Implement Complex#<=> so that it is usable as an argument when
calling <=> on objects of other classes (since #coerce will coerce
such numbers to Complex). If the complex number has a zero imaginary
part, and the other argument is a real number (or complex number with
zero imaginary part), return -1, 0, or 1. Otherwise, return nil,
indicating the objects are not comparable.
Fixes [Bug #15857]
|
|
test_opal, test_ruby18, and test_ruby22 are slow tests.
https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-ad7f67/ruby-master/log/20190619T105405Z.fail.html.gz
|
|
|
|
Because some environment created the different results from test fixtures.
|
|
|
|
|
|
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|
|
|
|
|
|
|
|
|
[Feature #15160]
|
|
* string.c (rb_str_init): allocate new buffer if the string is
shared. [Bug #15937]
|
|
* string.c (rb_str_init): preserve the embedded content when
self-copying with a capacity. [Bug #15937]
|
|
Registering a string that depend on a dependent string as fstring
can lead to use-after-free. See c06ddfe and 3f95620 for details.
The following script triggers use-after-free on trunk, 2.4.6, 2.5.5
and 2.6.3. Credits to @wanabe for using eval as a cross-version way
of registering a fstring.
```ruby
a = ('j' * 24).b.b
eval('', binding, a)
p a
4.times { GC.start }
p a
```
- string.c (str_replace_shared_without_enc): when given a
dependent string, depend on the root of the dependent
string.
[Bug #15934]
|
|
* parse.y (value_expr_check): `then` or `else` only `if` is not a
void value expression, as the counterpart is evaluated as `nil`.
[Bug #15932]
|
|
* parse.y (value_expr_check): if either of `then` or `else`
statements is not a void value expression, the whole `if` is not
also a void value expression. [Bug #15932]
|
|
This reverts commit 44caca11cfa6bea01a1ef738846183f1a56d5658.
The change caused a build failure.
http://ci.rvm.jp/results/trunk-vm-asserts@silicon-docker/2102153
|
|
compile.c (NODE_CDECL): Evaluate the module before the value
test/ruby/test_const.rb (test_evaluation_order): added a test case
|
|
|
|
|
|
|
|
|