Age | Commit message (Collapse) | Author |
|
https://github.com/ruby/prism/commit/50d79b734b
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11366
|
|
Some case it is difficult to know the calling method uses a block
or not with `send` on a general framework. So this patch stops
showing unused block warning on `send`.
example with test/unit:
```ruby
require 'test/unit'
class T < Test::Unit::TestCase
def setup
end
def test_foo = nil
end
```
=> /home/ko1/ruby/install/master/lib/ruby/gems/3.4.0+0/gems/test-unit-3.6.2/lib/test/unit/fixture.rb:284: warning: the block passed to 'priority_setup' defined at /home/ko1/ruby/install/master/lib/ruby/gems/3.4.0+0/gems/test-unit-3.6.2/lib/test/unit/priority.rb:183 may be ignored
because test/unit can call any setup method (`priority_setup` in this case) with a block.
Maybe we can show the warning again when we provide a way to recognize
the calling method uses a block or not.
Notes:
Merged: https://github.com/ruby/ruby/pull/11349
|
|
... of commit 00176cd40fe9f385231e9c20b956fc4a84d240b9.
The reverted change was made only for constistency, as discussed in
https://github.com/ruby/ruby/pull/11358#issuecomment-2282222369
But the platform string "mingw-ucrt" should not be changed.
It is used as RUBY_PLATFORM and as the rubygems platform, so that there should
be a good reason to change the name of an established platform.
"mingw-ucrt" was introduced intentionally in commit
576b2e64cdc5ea42ad345dd3c1c215e006c06fca.
Related to GH-11358
Notes:
Merged: https://github.com/ruby/ruby/pull/11364
Merged-By: XrXr
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11340
|
|
https://github.com/ruby/prism/commit/7c9ca47ac5
|
|
RUBY_TYPED_DEFAULT_FREE will only free the rand_loop_t, but it will cause
the buf to be leaked. This commit fixes the memory leak by implementing
a free function for the rand_loop_t type.
Notes:
Merged: https://github.com/ruby/ruby/pull/11354
|
|
[Bug #20344]
Fix compile_next adding removable adjust label
Notes:
Merged: https://github.com/ruby/ruby/pull/11316
|
|
|
|
It just wastes memory.
Notes:
Merged: https://github.com/ruby/ruby/pull/11361
|
|
```
../../.././include/ruby/internal/special_consts.h:349:36: error: conversion to ‘VALUE’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Werror=sign-conversion]
349 | return RB_SPECIAL_CONST_P(obj) * RUBY_Qtrue;
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
```
|
|
|
|
`RBOOL` is a macro to convert C boolean to Ruby boolean.
Notes:
Merged: https://github.com/ruby/ruby/pull/11351
|
|
And fix unclosed parenthesis.
Notes:
Merged: https://github.com/ruby/ruby/pull/11351
|
|
Even if it succeeds, it takes almost 40 minutes.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11358
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11358
|
|
The bug didn't impact master because this was largely refactored,
but it's still valuable to add the test for it to prevent future
regressions.
Notes:
Merged: https://github.com/ruby/ruby/pull/11359
|
|
`Prism.lex` and `Prism.lex_file` return `ParseLexResult` instead of `Array`.
`Prism::parse_lex` and `Prism::parse_lex_file` return `ParseLexResult` instead of `ParseResult`.
This PR updates the documentation to reflect these return values.
https://github.com/ruby/prism/commit/ee331941c0
|
|
Setting up the fake array is a bit more expensive than would be
expected because `rb_ary_freeze` does a lot of checks and lookup
a shape transition.
If we assume fake arrays will always be frozen, we can precompute
the flags state and just assign it.
Notes:
Merged: https://github.com/ruby/ruby/pull/11344
|
|
When an exception is raised, it can leak memory in `head`. There are two
places that can leak memory:
1. `Check_Type(tuple, T_ARRAY)` can leak memory if `tuple` is not an
array.
2. `StringValue(name)` and `StringValue(value)` if they are not strings
and the call to `to_str` does not return a string.
This commit fixes these memory leaks by wrapping the code around a
rb_ensure so that the memory is freed in all cases.
The following code demonstrates the memory leak:
emitter = Psych::Emitter.new(StringIO.new)
nil_to_string_tags = [[nil, "tag:TALOS"]] + ([1] * 1000)
expected_array_tags = [1] * 1000
10.times do
1_000.times do
# Raises `no implicit conversion of nil into String`
emitter.start_document([], nil_to_string_tags, 0)
rescue TypeError
end
1_000.times do
# Raises `wrong argument type Integer (expected Array)`
emitter.start_document([], expected_array_tags, 0)
rescue TypeError
end
puts `ps -o rss= -p #{$$}`
end
Before:
47248
79728
111968
144224
176480
208896
241104
273280
305472
337664
After:
14832
15088
15344
15344
15360
15632
15632
15632
15648
15648
https://github.com/ruby/psych/commit/053af73818
|
|
If both strings have the same encoding, all this work is useless.
Notes:
Merged: https://github.com/ruby/ruby/pull/11353
|
|
If the string only contain single byte characters we can
skips all the costly checks.
Notes:
Merged: https://github.com/ruby/ruby/pull/11353
|
|
`rb_enc_from_index` is a costly operation so it is worth avoiding
to call it for the common encodings.
Also in the case of UTF-8, it's more efficient to scan the
coderange if it is unknown that to fallback to the slower
algorithms.
Notes:
Merged: https://github.com/ruby/ruby/pull/11353
|
|
|
|
|
|
https://github.com/ruby/psych/commit/64bfc308f8
|
|
https://github.com/ruby/psych/commit/74a6b4d226
|
|
|
|
https://github.com/ruby/psych/commit/e7d64c9848
|
|
It's not necessary for the GC implementation to call rb_gc_mark_roots
which calls back into the GC implementation's rb_gc_impl_objspace_mark.
Notes:
Merged: https://github.com/ruby/ruby/pull/11325
|
|
`STR_EMBED_P` uses `FL_TEST_RAW` meaning we already assume `str`
isn't an immediate, so we can use `FL_TEST_RAW` here too.
Notes:
Merged: https://github.com/ruby/ruby/pull/11350
|
|
If we assume that most strings we modify are not frozen and
are independent, then we can optimize this case by replacing
multiple flag checks by a single mask check.
Notes:
Merged: https://github.com/ruby/ruby/pull/11350
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11348
|
|
* YJIT: Allow tracing fallback counters
* Update yjit.md about --yjit-trace-exits=counter
Notes:
Merged-By: k0kubun <[email protected]>
|
|
Notes:
Merged-By: peterzhu2118 <[email protected]>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11330
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11328
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11328
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11327
|
|
Sync rdoc
This syncs changes made in https://github.com/ruby/rdoc/pull/1148, which
will fix https://docs.ruby-lang.org/en/master/'s display on certain screens.
Notes:
Merged-By: k0kubun <[email protected]>
|
|
YJIT currently uses the YJIT root object to mark objects during GC and
update references during compaction. This object otherwise serves no
purpose.
This commit changes it YJIT to be step when marking the GC root. This
saves some memory from being allocated from the system and the GC.
Notes:
Merged-By: maximecb <[email protected]>
|
|
We're seeing a crash during shutdown in rb_gc_impl_objspace_free because
it's running lazy sweeping during shutdown. It appears that it's due to
`finalizing` being set, which causes GC to not be aborted and not
disabled which causes it to be in lazy sweeping at shutdown.
The full stack trace is:
#6 rb_bug (fmt=fmt@entry=0x5643b8ebde78 "lazy sweeping underway when freeing object space") at error.c:1095
#7 0x00005643b8a3c697 in rb_gc_impl_objspace_free (objspace_ptr=<optimized out>) at gc/default.c:9507
#8 0x00005643b8c269eb in ruby_vm_destruct (vm=0x7e2fdc84d000) at vm.c:3141
#9 0x00005643b8a5147b in rb_ec_cleanup (ec=<optimized out>, ex=<optimized out>) at eval.c:263
#10 0x00005643b8a51c93 in ruby_run_node (n=<optimized out>) at eval.c:319
#11 0x00005643b8a4c7c7 in rb_main (argv=0x7fffef15e7f8, argc=18) at ./main.c:43
#12 main (argc=<optimized out>, argv=<optimized out>) at ./main.c:62
Notes:
Merged: https://github.com/ruby/ruby/pull/11317
|
|
|
|
Like the following scenario with bootsnap, that frames are same or smaller than frame_to_skip(=3).
---
"/Users/hsbt/.local/share/rbenv/versions/3.3-dev/lib/ruby/3.3.0/bundled_gems.rb:69:in `block (2 levels) in replace_require'"
"/Users/hsbt/.local/share/gem/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'"
"test_warn_bootsnap.rb:11:in `<main>'"
---
|
|
The `2` skipped frames went out of sync and now it should be `3`.
Rather than just update the offset, we can implement a way that
is adaptative as long as all require decorators are also called require.
Also we should compute the corresponding `uplevel` otherwise the
warning will still point decorators.
Co-authored-by: "Hiroshi SHIBATA" <[email protected]>
|
|
This change didn't work with Ruby 3.3.
We should revert this to test bundled_gems.rb with Ruby 3.3.
|
|
This reverts commit c3becc3ba6c584fbeabd5182e304e61529235fe6.
Notes:
Merged: https://github.com/ruby/ruby/pull/11333
|
|
https://github.com/ruby/uri/commit/898b889811
|
|
https://github.com/ruby/uri/commit/9997c1acee
|