Age | Commit message (Collapse) | Author |
|
The module that is about to be included is considered initialized.
Notes:
Merged: https://github.com/ruby/ruby/pull/4868
|
|
Previously the test verified on MSWIN that huge values can not be stored in environment variables but that they can on others.
IMHO the intention of the test should not change between platforms.
Therefore this adjusts the test to have the same intention - that is to store a big value.
This also fixes compatibility with MINGW-UCRT, which previously failed with:
<Errno::EINVAL: Invalid argument - ruby_setenv(foo)>
test/ruby/test_env.rb:512:in `[]='
test/ruby/test_env.rb:512:in `block in test_huge_value'
Notes:
Merged: https://github.com/ruby/ruby/pull/4599
|
|
This reverts commit ddb85c5d2bdf75a83eb163856508691a7436b446.
This commit causes unexpected warnings in TestTranscode#test_loading_race
occasionally in CI.
|
|
This fixes issues with paths being loaded twice in certain cases
when symlinks are used.
It took me multiple attempts to get this working. My original
attempt tried to convert paths to realpaths before adding them
to $LOADED_FEATURES. Unfortunately, this doesn't work well
with the loaded feature index, which is based off load paths
and not realpaths. While I was able to get require working, I'm
fairly sure the loaded feature index was not being used as
expected, which would have significant performance implications.
Additionally, I was never able to get that approach working with
autoload when autoloading a non-realpath file. It also broke
some specs.
This takes a more conservative approach. Directly before loading the
file, if the file with the same realpath has been required, the
loading of the file is skipped. The realpaths are stored as
fstrings in a hidden hash.
When rebuilding the loaded feature index, the hash of realpaths
is also rebuilt. I'm guessing this makes rebuilding process
slower, but I don think that is a hot path. In general, modifying
loaded features is only done when reloading, and that tends to be
in non-production environments.
Change test_require_with_loaded_features_pop test to use 30 threads
and 300 iterations, instead of 4 threads and 1000 iterations.
I saw only sporadic failures with 4/1000, but consistent failures
30/300 threads. These failures were due to the fact that the
concurrent deletions from $LOADED_FEATURES in other threads can
result in rb_ary_entry returning nil when rebuilding the loaded
features index.
To avoid concurrency issues when rebuilding the loaded features
index, the building of the index itself is left alone, and
afterwards, a separate loop is done on a copy of the loaded feature
snapshot in order to rebuild the realpaths hash.
Fixes [Bug #17885]
Notes:
Merged: https://github.com/ruby/ruby/pull/4615
|
|
|
|
[Bug #18178]
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4858
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4858
|
|
|
|
The method to return the length of the matched substring
corresponding to the given argument.
Notes:
Merged: https://github.com/ruby/ruby/pull/4851
|
|
The method to return the single matched substring corresponding to
the given argument.
Notes:
Merged: https://github.com/ruby/ruby/pull/4851
|
|
If $LOADED_FEATURES is changed in the just required file, also the
index table needs to be updated before loaded_features_snapshot is
reset. If the snapshot is reset without updating the table, the
name of the added feature will not be found.
Notes:
Merged: https://github.com/ruby/ruby/pull/4849
|
|
|
|
Ref: https://bugs.ruby-lang.org/issues/18141
Notes:
Merged: https://github.com/ruby/ruby/pull/4797
|
|
Instead of looking for Object::ENV (which can be overwritten),
directly look for the envtbl variable. As that is static in hash.c,
and the lookup code is in process.c, add a couple non-static
functions that will return envtbl (or envtbl#to_hash).
Fixes [Bug #18164]
Notes:
Merged: https://github.com/ruby/ruby/pull/4834
|
|
|
|
Introduces specification tests for mixed values and value omissions for
Hashes and keyword arguments, such as `{ a:, b:, c: 3 }`.
Notes:
Merged: https://github.com/ruby/ruby/pull/4829
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4822
|
|
[Feature #14579]
|
|
The value of the dynamic key cannot be omitted for now.
|
|
`{x:, y:}` is a syntax sugar of `{x: x, y: y}`.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4813
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4813
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4813
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4813
|
|
String#initialize can leak memory when called on a string that is marked
with STR_NOFREE because it does not unset the STR_NOFREE flag.
Notes:
Merged: https://github.com/ruby/ruby/pull/4814
|
|
test-unit migration
|
|
|
|
|
|
This prevents early collection of the array. The GC doesn't see the
array on the stack when Ruby is compiled with optimizations enabled
[ruby-core:105099] [Bug #18140]
|
|
In vm_call_method_each_type, check for c_call and c_return events before
dispatching to vm_call_ivar and vm_call_attrset. With this approach, the
call cache will still dispatch directly to those functions, so this
change will only decrease performance for the first (uncached) call, and
even then, the performance decrease is very minimal.
This approach requires that we clear the call caches when tracing is
enabled or disabled. The approach currently switches all vm_call_ivar
and vm_call_attrset call caches to vm_call_general any time tracing is
enabled or disabled. So it could theoretically result in a slowdown for
code that constantly enables or disables tracing.
This approach does not handle targeted tracepoints, but from my testing,
c_call and c_return events are not supported for targeted tracepoints,
so that shouldn't matter.
This includes a benchmark showing the performance decrease is minimal
if detectable at all.
Fixes [Bug #16383]
Fixes [Bug #10470]
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
Notes:
Merged: https://github.com/ruby/ruby/pull/4767
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4788
|
|
|
|
|
|
These were introduced in the test for tracing optimized methods
added in 48c8df9e0eb295af06d593ce37ce1933c0ee1d90.
|
|
Mashalling a closed IO object raised "closed stream (IOError)" before instead of TypeError.
This changes IO#(in|ex)ternal_encoding to still return the encoding even if the underlying FD is closed.
Fixes bug #18077
Notes:
Merged: https://github.com/ruby/ruby/pull/4758
|
|
This updates the trace instructions to directly dispatch to
opt_send_without_block. So this should cause no slowdown in
non-trace mode.
To enable the tracing of the optimized methods, RUBY_EVENT_C_CALL
and RUBY_EVENT_C_RETURN are added as events to the specialized
instructions.
Fixes [Bug #14870]
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
Notes:
Merged: https://github.com/ruby/ruby/pull/4739
Merged-By: jeremyevans <code@jeremyevans.net>
|
|
... as per ko1's preference. He is preparing to extend this feature to
ISeq for his new debugger. He prefers "keep" to "save" for this wording.
This API is internal and not included in any released version, so I
change it in advance.
|
|
[ruby-core:86949] [Bug #14744]
Reported by Eregon (Benoit Daloze). Thanks!
|
|
|
|
|
|
The emoji data in emoji-variation-sequences.txt was not used for
in test/ruby/enc/test_emoji_breaks.rb, for unknown reasons.
It turned out that the format of each of the emoji data/test files
is slightly different, and that we didn't take into account that
empty fields after a semicolon, as present in
emoji-variation-sequences.txt, led to less fields than expected
when using split.
This addresses issue #18027.
|
|
[0] => [0, *, a]
#=> [0] length mismatch (given 1, expected 2+) (NoMatchingPatternError)
Ignore test failures of typeprof caused by this change for now.
|
|
events get enabled
|
|
|
|
|
|
|
|
`TracePoint.stat` returns the "to be deleted" TP numbers, and
http://rubyci.s3.amazonaws.com/graviton2/ruby-master/log/20210810T030003Z.fail.html.gz
shows there is a "to be deleted" TP.
This patch uses only :line event and add some lines to allow MRI
deletes "to be deleted" TPs.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4727
|
|
ndigits higher than 14 can result in values that are slightly too
large due to floating point limitations. Converting to rational
for the calculation and then back to float fixes these issues.
Fixes [Bug #14635]
Fixes [Bug #17183]
Co-authored by: Yusuke Endoh <mame@ruby-lang.org>
Notes:
Merged: https://github.com/ruby/ruby/pull/4682
|