Age | Commit message (Collapse) | Author |
|
|
|
|
|
st.c: Do not clear entries_bound when calling Hash#shift for empty
hash
tab->entries_bound is used to check if the bins are full in
rebuild_table_if_necessary.
Hash#shift against an empty hash assigned 0 to tab->entries_bound, but
didn't clear the bins. Thus, the table is not rebuilt even when the bins
are full. Attempting to add a new element into full-bin hash gets stuck.
This change stops clearing tab->entries_bound in Hash#shift.
[Bug #18578]
---
st.c | 1 -
test/ruby/test_hash.rb | 13 +++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
|
|
|
|
|
|
Fix TAG_THROW through require [Bug #18562]
Previously this was being incorrectly swapped with TAG_RAISE in the next
line. This would end up checking the T_IMEMO throw_data to the exception
handling (which calls Module#===). This happened to not break existing
tests because Module#=== returned false when klass is NULL.
This commit handles throw from require correctly by jumping to the tag
retaining the TAG_THROW state.
---
load.c | 2 +-
test/ruby/test_exception.rb | 21 +++++++++++++++++++++
2 files changed, 22 insertions(+), 1 deletion(-)
|
|
[Bug #18501] Fire write barrier after hash has been written
Before this change the write barrier was executed before the key and
value were actually reachable via the Hash. This could cause
inconsistencies in object coloration which would lead to accidental
collection of dup'd keys.
Example:
1. Object O is grey, Object P is white.
2. Write barrier fires O -> P
3. Write barrier does nothing
4. Malloc happens, which starts GC
5. GC colors O black
6. P is written in to O (now we have O -> P reference)
7. P is now accidentally treated as garbage
---
hash.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
|
|
[Bug#18556] Fallback `MAP_ ANONYMOUS`
Define `MAP_ANONYMOUS` to `MAP_ANON` if undefined on old systems.
---
gc.c | 4 ++++
1 file changed, 4 insertions(+)
|
|
|
|
7ff1bf317887c0d7b21e91ad548d07b9f05c540c,e89d80702bd98a8276243a7fcaa2a158b3bfb659: [Backport #18516]
An alias can suppress method redefinition warning
---
test/ruby/test_alias.rb | 11 +++++++++++
1 file changed, 11 insertions(+)
Fix memory leak at the same named alias [Bug #18516]
When aliasing a method to the same name method, set a separate bit
flag on that method definition, instead of the reference count
increment. Although this kind of alias has no actual effect at
runtime, is used as the hack to suppress the method re-definition
warning.
---
method.h | 1 +
test/ruby/test_alias.rb | 18 ++++++++++++++++++
vm_method.c | 9 ++++++++-
3 files changed, 27 insertions(+), 1 deletion(-)
|
|
|
|
f27eb8148f5a72bbacfebfecc7de9305471bb5c9,d75f7078c831d45ab5ba2fae4fbb308d01a21e46,d5836db1b398a7936b0461b3011db66f6cc8c490: [Backport #18443]
Sync io-console gem.
---
ext/io/console/console.c | 8 ++++++--
test/io/console/test_io_console.rb | 8 ++++++++
2 files changed, 14 insertions(+), 2 deletions(-)
[ruby/io-console] bump up to 0.5.11
https://github.com/ruby/io-console/commit/ad3805200c
---
ext/io/console/io-console.gemspec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Fix `Leaked file descriptor: TestIO_Console#test_console_kw`
```
Leaked file descriptor: TestIO_Console#test_console_kw: 10 : #<File:/dev/tty>
```
---
test/io/console/test_io_console.rb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
Shifting zero always results in zero [Bug #18517]
---
numeric.c | 2 ++
1 file changed, 2 insertions(+)
|
|
5c7af72304d0ad33cd3f21b24a4bc44e8acd5b2c,d650b17686d49c2ce8e6a87039861154e93d4621: [Backport #18497]
Assuming EXIT_SUCCESS equals 0 is not portable
---
test/ruby/test_fiber.rb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
`rb_fiber_terminate` must not return [Bug #18497]
In a forked process from a fiber, the fiber becomes the only
fiber, `fiber_switch` does nothing as there is no other fibers,
`rb_fiber_terminate` does not terminate the fiber. In that case,
reaches the end of `fiber_entry` finaly, which is declared as
"COROUTINE" and should never return.
---
cont.c | 3 ++-
eval_intern.h | 2 +-
test/fiber/test_process.rb | 15 +++++++++++++++
test/ruby/test_fiber.rb | 5 +++++
4 files changed, 23 insertions(+), 2 deletions(-)
|
|
Fix the placeholder subclass entry skipping [Bug #18489]
---
class.c | 3 +--
test/ruby/test_module.rb | 9 +++++++++
2 files changed, 10 insertions(+), 2 deletions(-)
|
|
thread.c: Convert TAG_BREAK to a normal exception at thread top-level
[Bug #18475]
---
test/ruby/test_enum.rb | 11 +++++++++++
thread.c | 3 +++
2 files changed, 14 insertions(+)
|
|
[ruby/optparse] Fix links to the page directory files [Bug #18468]
https://github.com/ruby/optparse/commit/dab72c543d
---
doc/optparse/creates_option.rdoc | 4 ++--
doc/optparse/option_params.rdoc | 2 +-
doc/optparse/tutorial.rdoc | 4 ++--
lib/optparse.rb | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
|
|
Allow include before calling Module#initialize
This is to allow Module subclasses that include modules before
calling super in the subclass's initialize.
Remove rb_module_check_initializable from Module#initialize.
Module#initialize only calls module_exec if a block is passed,
it doesn't have other issues that would cause problems if
called multiple times or with an already initialized module.
Move initialization of super to Module#allocate, though I'm not
sure it is required there. However, it's needed to be removed
from Module#initialize for this to work.
Fixes [Bug #18292]
---
class.c | 1 +
object.c | 1 -
test/ruby/test_module.rb | 10 ++++++++++
3 files changed, 11 insertions(+), 1 deletion(-)
|
|
Fix default --jit-max-cache in `ruby --help`
changed at 028f1887c2bfa50dcfc1b623470d6ab1b880fdde
---
ruby.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Fix documentation for Dir.glob
Dir.glob("*", File::FNM_DOTMATCH) no longer includes ".." in the
returned array as of Ruby 3.1.
Fixes [Bug #18436]
---
dir.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Don't segfault if Warning.warn is undefined
Check that there is a method entry for the method before passing
it to rb_method_entry_arity.
Fixes [Bug #18458]
---
error.c | 3 ++-
test/ruby/test_exception.rb | 8 ++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
|
|
YJIT: Fix SP index with optarg and unordered kwarg
Previously when we were calling a method with an optional argument and
multiple keywords arguments which weren't in the order the receiver
expected we would use the wrong SP index to rearrange them.
Fixes Bug #18453
---
bootstraptest/test_yjit.rb | 16 ++++++++++++++++
yjit_codegen.c | 7 +++++--
2 files changed, 21 insertions(+), 2 deletions(-)
|
|
Make RubyVM::AST.of work with code written in `-e` command-line
option
[Bug #18434]
---
ast.c | 11 +++++++----
test/ruby/test_ast.rb | 5 +++++
2 files changed, 12 insertions(+), 4 deletions(-)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|