| Age | Commit message (Collapse) | Author |
|
5f8ebcada099351acbc22db264e7cd3773c2bdc4, e13575bb7938e9e5b6a79bfca1b3793123f479da, 4adcfc8cd7a17593a6590025da2b03eebf4fd63c: [Backport #19584]
Fix crash in rb_gc_register_address
[Bug #19584]
Some C extensions pass a pointer to a global variable to
rb_gc_register_address. However, if a GC is triggered inside of
rb_gc_register_address, then the object could get swept since it does
not exist on the stack.
[Bug #19584] Register global variable address before assignment
[Bug #19584] Register global variables before assignment
[Bug #19584] [DOC] Tweek description of `rb_gc_register_address`
|
|
warning.
|
|
[Bug #20322] Fix rb_enc_interned_str_cstr null encoding
The documentation for `rb_enc_interned_str_cstr` notes that `enc` can be
a null pointer, but this currently causes a segmentation fault when
trying to autoload the encoding. This commit fixes the issue by checking
for NULL before calling `rb_enc_autoload`.
|
|
cd5e6cc0ea48353c88d921b885b552dc76da255c,bbf54ec334fe2edd7669a944d88d17efde49a412: [Backport #19307]
Update to ruby/mspec@fef9b81
---
spec/mspec/tool/tag_from_output.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Update to ruby/spec@9d69b95
---
spec/ruby/core/array/keep_if_spec.rb | 1 +
spec/ruby/core/array/pack/c_spec.rb | 14 +-
spec/ruby/core/array/pack/shared/basic.rb | 40 ++++
spec/ruby/core/array/pack/shared/float.rb | 66 ++++++-
spec/ruby/core/array/pack/shared/integer.rb | 96 +++++++--
spec/ruby/core/array/pack/shared/numeric_basic.rb | 10 +-
spec/ruby/core/array/pack/shared/unicode.rb | 14 +-
spec/ruby/core/array/pack/w_spec.rb | 14 +-
spec/ruby/core/array/shared/unshift.rb | 18 ++
spec/ruby/core/array/values_at_spec.rb | 1 +
spec/ruby/core/array/zip_spec.rb | 6 +
spec/ruby/core/class/subclasses_spec.rb | 22 +++
spec/ruby/core/dir/home_spec.rb | 44 +++--
spec/ruby/core/dir/mkdir_spec.rb | 18 +-
spec/ruby/core/enumerable/zip_spec.rb | 5 +
spec/ruby/core/float/comparison_spec.rb | 35 ++--
spec/ruby/core/float/divmod_spec.rb | 2 +-
spec/ruby/core/float/gt_spec.rb | 21 ++
spec/ruby/core/float/gte_spec.rb | 21 ++
spec/ruby/core/float/lt_spec.rb | 21 ++
spec/ruby/core/float/lte_spec.rb | 21 ++
spec/ruby/core/float/shared/equal.rb | 21 ++
spec/ruby/core/io/gets_spec.rb | 4 +
spec/ruby/core/io/lineno_spec.rb | 9 +-
spec/ruby/core/io/new_spec.rb | 2 +
spec/ruby/core/io/readline_spec.rb | 4 +
spec/ruby/core/io/readlines_spec.rb | 4 +
spec/ruby/core/io/shared/each.rb | 4 +
spec/ruby/core/io/shared/new.rb | 2 +
spec/ruby/core/io/shared/pos.rb | 8 +-
spec/ruby/core/io/shared/readlines.rb | 4 +
spec/ruby/core/io/sysseek_spec.rb | 2 +-
spec/ruby/core/kernel/shared/load.rb | 31 ++-
spec/ruby/core/kernel/singleton_class_spec.rb | 2 +
spec/ruby/core/marshal/dump_spec.rb | 45 ++++-
spec/ruby/core/marshal/fixtures/classes.rb | 4 +
spec/ruby/core/matchdata/values_at_spec.rb | 73 ++++++-
spec/ruby/core/module/fixtures/classes.rb | 1 +
spec/ruby/core/module/include_spec.rb | 4 +-
spec/ruby/core/module/prepend_spec.rb | 12 ++
.../ruby/core/objectspace/define_finalizer_spec.rb | 22 +++
spec/ruby/core/process/constants_spec.rb | 1 +
spec/ruby/core/process/detach_spec.rb | 29 +++
spec/ruby/core/process/spawn_spec.rb | 10 +
spec/ruby/core/process/times_spec.rb | 2 +-
spec/ruby/core/queue/initialize_spec.rb | 13 +-
spec/ruby/core/refinement/import_methods_spec.rb | 34 ++++
spec/ruby/core/refinement/include_spec.rb | 27 +++
spec/ruby/core/refinement/prepend_spec.rb | 27 +++
spec/ruby/core/regexp/initialize_spec.rb | 2 +-
spec/ruby/core/signal/trap_spec.rb | 12 ++
spec/ruby/core/string/byteslice_spec.rb | 6 +
spec/ruby/core/string/capitalize_spec.rb | 4 +
spec/ruby/core/string/chars_spec.rb | 7 +-
spec/ruby/core/string/chomp_spec.rb | 4 +
spec/ruby/core/string/chop_spec.rb | 4 +
spec/ruby/core/string/clone_spec.rb | 4 +
spec/ruby/core/string/delete_prefix_spec.rb | 4 +
spec/ruby/core/string/delete_spec.rb | 4 +
spec/ruby/core/string/delete_suffix_spec.rb | 4 +
spec/ruby/core/string/downcase_spec.rb | 4 +
spec/ruby/core/string/dump_spec.rb | 10 +-
spec/ruby/core/string/dup_spec.rb | 4 +
spec/ruby/core/string/lines_spec.rb | 1 -
spec/ruby/core/string/reverse_spec.rb | 4 +
spec/ruby/core/string/scan_spec.rb | 6 +
spec/ruby/core/string/scrub_spec.rb | 10 +
spec/ruby/core/string/shared/each_line.rb | 6 +
spec/ruby/core/string/shared/partition.rb | 15 ++
spec/ruby/core/string/shared/slice.rb | 13 +-
spec/ruby/core/string/shared/strip.rb | 4 +
spec/ruby/core/string/shared/succ.rb | 4 +
spec/ruby/core/string/split_spec.rb | 17 +-
spec/ruby/core/string/squeeze_spec.rb | 5 +
spec/ruby/core/string/swapcase_spec.rb | 4 +
spec/ruby/core/string/undump_spec.rb | 2 +-
spec/ruby/core/string/unpack/b_spec.rb | 28 ++-
spec/ruby/core/string/unpack/c_spec.rb | 14 +-
spec/ruby/core/string/unpack/h_spec.rb | 28 ++-
spec/ruby/core/string/unpack/shared/basic.rb | 28 ---
spec/ruby/core/string/unpack/shared/float.rb | 60 +++++-
spec/ruby/core/string/unpack/shared/integer.rb | 88 +++++++--
spec/ruby/core/string/unpack/shared/unicode.rb | 14 +-
spec/ruby/core/string/unpack/w_spec.rb | 14 +-
spec/ruby/core/string/unpack1_spec.rb | 12 +-
spec/ruby/core/string/unpack_spec.rb | 34 ++++
spec/ruby/core/string/upcase_spec.rb | 4 +
spec/ruby/core/string/valid_encoding/utf_8_spec.rb | 214 +++++++++++++++++++++
spec/ruby/core/struct/values_at_spec.rb | 55 +++++-
spec/ruby/core/symbol/shared/id2name.rb | 7 +
spec/ruby/core/time/at_spec.rb | 16 ++
spec/ruby/core/time/localtime_spec.rb | 16 +-
spec/ruby/core/time/new_spec.rb | 94 +++++++--
spec/ruby/core/time/shared/gmtime.rb | 4 +-
spec/ruby/core/time/shared/time_params.rb | 11 +-
spec/ruby/core/time/strftime_spec.rb | 40 +++-
spec/ruby/core/time/utc_spec.rb | 41 +++-
spec/ruby/core/time/zone_spec.rb | 20 +-
spec/ruby/core/tracepoint/inspect_spec.rb | 9 +
spec/ruby/fixtures/code/load_wrap_fixture.rb | 12 ++
spec/ruby/fixtures/code/wrap_fixture.rb | 9 -
spec/ruby/language/case_spec.rb | 4 +-
.../ruby/language/regexp/character_classes_spec.rb | 5 +
spec/ruby/library/coverage/running_spec.rb | 20 ++
spec/ruby/library/date/civil_spec.rb | 7 +-
spec/ruby/library/objectspace/fixtures/trace.rb | 5 +
spec/ruby/library/objectspace/trace_spec.rb | 15 ++
spec/ruby/library/openssl/x509/name/verify_spec.rb | 4 +-
spec/ruby/library/stringio/initialize_spec.rb | 85 ++++++++
spec/ruby/library/stringio/new_spec.rb | 8 +
spec/ruby/library/stringio/shared/write.rb | 22 +++
spec/ruby/optional/capi/ext/io_spec.c | 43 +++++
spec/ruby/optional/capi/io_spec.rb | 15 ++
spec/ruby/shared/rational/Rational.rb | 48 ++---
114 files changed, 1963 insertions(+), 245 deletions(-)
create mode 100644 spec/ruby/core/marshal/fixtures/classes.rb
create mode 100644 spec/ruby/core/refinement/import_methods_spec.rb
create mode 100644 spec/ruby/core/refinement/include_spec.rb
create mode 100644 spec/ruby/core/refinement/prepend_spec.rb
create mode 100644 spec/ruby/core/string/unpack_spec.rb
create mode 100644 spec/ruby/core/string/valid_encoding/utf_8_spec.rb
create mode 100644 spec/ruby/fixtures/code/load_wrap_fixture.rb
delete mode 100644 spec/ruby/fixtures/code/wrap_fixture.rb
create mode 100644 spec/ruby/library/coverage/running_spec.rb
create mode 100644 spec/ruby/library/objectspace/fixtures/trace.rb
create mode 100644 spec/ruby/library/objectspace/trace_spec.rb
create mode 100644 spec/ruby/library/stringio/new_spec.rb
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6772
|
|
|
|
|
|
|
|
Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
Notes:
Merged: https://github.com/ruby/ruby/pull/6590
|
|
|
|
Object Shapes is used for accessing instance variables and representing the
"frozenness" of objects. Object instances have a "shape" and the shape
represents some attributes of the object (currently which instance variables are
set and the "frozenness"). Shapes form a tree data structure, and when a new
instance variable is set on an object, that object "transitions" to a new shape
in the shape tree. Each shape has an ID that is used for caching. The shape
structure is independent of class, so objects of different types can have the
same shape.
For example:
```ruby
class Foo
def initialize
# Starts with shape id 0
@a = 1 # transitions to shape id 1
@b = 1 # transitions to shape id 2
end
end
class Bar
def initialize
# Starts with shape id 0
@a = 1 # transitions to shape id 1
@b = 1 # transitions to shape id 2
end
end
foo = Foo.new # `foo` has shape id 2
bar = Bar.new # `bar` has shape id 2
```
Both `foo` and `bar` instances have the same shape because they both set
instance variables of the same name in the same order.
This technique can help to improve inline cache hits as well as generate more
efficient machine code in JIT compilers.
This commit also adds some methods for debugging shapes on objects. See
`RubyVM::Shape` for more details.
For more context on Object Shapes, see [Feature: #18776]
Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
Co-Authored-By: Eileen M. Uchitelle <eileencodes@gmail.com>
Co-Authored-By: John Hawthorn <john@hawthorn.email>
|
|
Revert "* expand tabs. [ci skip]"
This reverts commit 830b5b5c351c5c6efa5ad461ae4ec5085e5f0275.
Revert "This commit implements the Object Shapes technique in CRuby."
This reverts commit 9ddfd2ca004d1952be79cf1b84c52c79a55978f4.
|
|
Object Shapes is used for accessing instance variables and representing the
"frozenness" of objects. Object instances have a "shape" and the shape
represents some attributes of the object (currently which instance variables are
set and the "frozenness"). Shapes form a tree data structure, and when a new
instance variable is set on an object, that object "transitions" to a new shape
in the shape tree. Each shape has an ID that is used for caching. The shape
structure is independent of class, so objects of different types can have the
same shape.
For example:
```ruby
class Foo
def initialize
# Starts with shape id 0
@a = 1 # transitions to shape id 1
@b = 1 # transitions to shape id 2
end
end
class Bar
def initialize
# Starts with shape id 0
@a = 1 # transitions to shape id 1
@b = 1 # transitions to shape id 2
end
end
foo = Foo.new # `foo` has shape id 2
bar = Bar.new # `bar` has shape id 2
```
Both `foo` and `bar` instances have the same shape because they both set
instance variables of the same name in the same order.
This technique can help to improve inline cache hits as well as generate more
efficient machine code in JIT compilers.
This commit also adds some methods for debugging shapes on objects. See
`RubyVM::Shape` for more details.
For more context on Object Shapes, see [Feature: #18776]
Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
Co-Authored-By: Eileen M. Uchitelle <eileencodes@gmail.com>
Co-Authored-By: John Hawthorn <john@hawthorn.email>
Notes:
Merged: https://github.com/ruby/ruby/pull/6386
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Check whether the current or previous frame is a Ruby frame in
call_trace_func and rb_tracearg_binding before attempting to
create a binding for the frame.
Fixes [Bug #18487]
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
Notes:
Merged: https://github.com/ruby/ruby/pull/5767
Merged-By: jeremyevans <code@jeremyevans.net>
|
|
This reverts commit 343ea9967e4a6b279eed6bd8e81ad0bdc747f254.
This causes an assertion failure with -DRUBY_DEBUG=1 -DRGENGC_CHECK_MODE=2
|
|
|
|
Check whether the current or previous frame is a Ruby frame in
call_trace_func before attempting to create a binding for the frame.
Fixes [Bug #18487]
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
Notes:
Merged: https://github.com/ruby/ruby/pull/5567
|
|
|
|
|
|
|
|
|
|
Already these had been announced to be removed in 3.2.
Notes:
Merged: https://github.com/ruby/ruby/pull/5348
|
|
|
|
This commit adds support for embedded strings with variable capacity and
uses Variable Width Allocation to allocate strings.
Notes:
Merged: https://github.com/ruby/ruby/pull/4933
|
|
|
|
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4871
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4649
|
|
|
|
What a silly bug.
Notes:
Merged: https://github.com/ruby/ruby/pull/4815
|
|
RBIMPL_WARNING_PUSH is a 3.0 feature. Rubyspec OTOH has to support 2.x.
Notes:
Merged: https://github.com/ruby/ruby/pull/4815
|
|
These warnings are okay here.
Notes:
Merged: https://github.com/ruby/ruby/pull/4815
|
|
|
|
- The file needed to link may be the import library.
- Remove duplicate flags.
|
|
|
|
* Hide read function warning in string_spec_RSTRING_PTR_read function
* The type of `read` may be `ssize_t`
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Notes:
Merged: https://github.com/ruby/ruby/pull/4703
Merged-By: nobu <nobu@ruby-lang.org>
|
|
on some platforms
* Use a longer string as <= 23 characters it's embedded on CRuby and
the value of rb_str_capacity() is implementation-specific.
|
|
|
|
|
|
|
|
|
|
* Run nmake check on Actions
* Skip tests not working in mswin GitHub Actions
* Override TEMP
* Revert "Skip tests not working in mswin GitHub Actions"
This reverts commit 544d2575fcdf23ae63cd25aa03fce10c28b259f2.
* Revert "Revert "Skip tests not working in mswin GitHub Actions""
This reverts commit e1f8ad7862c9c4be52dc6e1031a004621eb07e6e.
* Fix timeouts
* Skip some more broken tests
* Update windows.yml
* Add a guard for rbasic_spec
* Revert "Update windows.yml"
This reverts commit bc9694b6b3b9594d406378d15ca11723fb052bc8.
* Skip the ensure clause
* Simplify the ensure
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|