Age | Commit message (Collapse) | Author |
|
|
|
cd4f5b13228879d954fa97b6aa479c4a5ef4fb0a,8db269edb3550a85dfab9b193ea115ca36912ced,ab63f6d8543903f177c46634f38e5428655f003b: [Backport #18140]
Guard array when appending
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]
---
array.c | 1 +
test/ruby/test_array.rb | 6 ++++++
2 files changed, 7 insertions(+)
Guard array when appending
This prevents early collection of the array. The GC doesn't see the
array on the stack when Ruby is compiled with optimizations enabled
Thanks @jhaberman for the test case
[ruby-core:105099] [Bug #18140]
---
ext/-test-/array/concat/depend | 321 ++++++++++++++++++++++++++++++++
ext/-test-/array/concat/extconf.rb | 2 +
ext/-test-/array/concat/to_ary_conact.c | 64 +++++++
test/-ext-/array/test_to_ary_concat.rb | 20 ++
4 files changed, 407 insertions(+)
create mode 100644 ext/-test-/array/concat/depend
create mode 100644 ext/-test-/array/concat/extconf.rb
create mode 100644 ext/-test-/array/concat/to_ary_conact.c
create mode 100644 test/-ext-/array/test_to_ary_concat.rb
Refined test [Bug #18140]
---
ext/-test-/array/concat/to_ary_conact.c | 48 +++++++--------------------------
test/ruby/test_array.rb | 5 +++-
2 files changed, 13 insertions(+), 40 deletions(-)
|
|
391abc543cea118a9cd7d6310acadbfa352668ef,e86c1f6fc53433ef5c82ed2b7a4cc9a12c153e4c,f6539202c52a051a4e6946a318a1d9cd29002990: [Backport #12052]
Scan the coderange in the given encoding
---
ext/-test-/string/enc_str_buf_cat.c | 14 ++++++++++++++
string.c | 32 ++++++++++++++++++++++---------
test/-ext-/string/test_enc_str_buf_cat.rb | 9 +++++++++
3 files changed, 46 insertions(+), 9 deletions(-)
Work around issue transcoding issue with non-ASCII compatible
encodings and xml escaping
When using a non-ASCII compatible source and destination encoding
and xml escaping (the :xml option to String#encode), the resulting
string was broken, as it used the correct non-ASCII compatible
encoding, but contained data that was ASCII-compatible instead of
compatible with the string's encoding.
Work around this issue by detecting the case where both the
source and destination encoding are non-ASCII compatible, and
transcoding the source string from the non-ASCII compatible
encoding to UTF-8. The xml escaping code will correctly handle
the UTF-8 source string and the return the correctly encoded
and escaped value.
Fixes [Bug #12052]
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
---
test/ruby/test_transcode.rb | 19 +++++++++++++++++++
transcode.c | 6 ++++++
2 files changed, 25 insertions(+)
=?UTF-8?q?-=20add=20regression=20tests=20for=20U+6E7F=20(?=
=?UTF-8?q?=E6=B9=BF)=20in=20ISO-2022-JP?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
In ISO-2022-JP, the bytes use to code are the same as those for "<>".
This adds regression tests to make sure that these bytes, when representing
湿, are NOT escaped with encode("ISO-2022-JP, xml: :text) or similar.
These are additional regression tests for #12052.
---
test/ruby/test_transcode.rb | 3 +++
1 file changed, 3 insertions(+)
|
|
rb_enc_interned_str: handle autoloaded encodings
If called with an autoloaded encoding that was not yet
initialized, `rb_enc_interned_str` would crash with
a NULL pointer exception.
See: https://github.com/ruby/ruby/pull/4119#issuecomment-800189841
---
encoding.c | 28 ++++++++++++----------------
ext/-test-/string/depend | 3 +++
ext/-test-/string/fstring.c | 15 +++++++++++++++
internal/encoding.h | 3 +++
string.c | 4 ++++
test/-ext-/string/test_fstring.rb | 16 ++++++++++++++++
6 files changed, 53 insertions(+), 16 deletions(-)
|
|
|
|
|
|
|
|
|
|
|
|
* Use the wrapper of rb_cObject instead of data access
* Replaced rest of extentions
* Updated the version guard for Data
* Added the version guard of rb_cData
Notes:
Merged: https://github.com/ruby/ruby/pull/3961
|
|
* memory_view.c: make Ractor-safe
* test/ruby/test_memory_view.rb: Add test_ractor
* memory_view: fix typo
* memory_view.c: Use st_update in unregster_exported_object
* memory_view: update dependency
Notes:
Merged-By: mrkn <mrkn@ruby-lang.org>
|
|
I don't use tool/sync_default_gem.rb because the last sync was incomplete.
Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
Co-authored-by: sinisterchipmunk <sinisterchipmunk@gmail.com>
Co-authored-by: Sutou Kouhei <kou@clear-code.com>
Notes:
Merged-By: mrkn <mrkn@ruby-lang.org>
|
|
rb_memory_view_prepare_item_desc (#3871)
Notes:
Merged-By: mrkn <mrkn@ruby-lang.org>
|
|
Notes:
Merged-By: mrkn <mrkn@ruby-lang.org>
|
|
This reverts the following three commits.
- ce707079c153f389d861c91a8dccc510fab0e245
- 1a76bb56b0ba99a19d1373c4c8ebac42e7b6f27c
- 51500eedefa492699668ced3e07e330a9a4d53ee
|
|
|
|
|
|
|
|
Fixes [Feature #13381]
When passed a `fake_str`, `register_fstring` would create new strings
with `str_new_static`. That's not what was expected, and answer
almost no use cases.
Notes:
Merged: https://github.com/ruby/ruby/pull/3786
|
|
* memory_view.c: remove a reference in view->obj at rb_memory_view_release
* memory_view.c: keep references of memory-view-exported objects
* Update common.mk
* memory_view.c: Use st_update
Notes:
Merged-By: mrkn <mrkn@ruby-lang.org>
|
|
```
find . -name \*.o -exec nm {} + |&
sed '/Init_.*\.rbimpl_id/!d;s/^.* b //;s/\.[1-9][0-9]*$//;s/\.rbimpl_id$//' |
uniq
```
should be empty.
|
|
|
|
|
|
This was a workaround for RUBY_ALIGNOF's glitch, which has already been
fixed. See also https://github.com/ruby/ruby/pull/3570
Notes:
Merged: https://github.com/ruby/ruby/pull/3631
|
|
* memory_view.c: Use ssize_t for ndim in memory_view
* include/ruby/memory_view.h: Fix the type of item_size argument
Notes:
Merged-By: mrkn <mrkn@ruby-lang.org>
|
|
|
|
* Add buffer protocol
* Modify for some review comments
* Per-object buffer availability
* Rename to MemoryView from Buffer and make compilable
* Support integral repeat count in memory view format
* Support 'x' for padding bytes
* Add rb_memory_view_parse_item_format
* Check type in rb_memory_view_register
* Update dependencies in common.mk
* Add test of MemoryView
* Add test of rb_memory_view_init_as_byte_array
* Add native size format test
* Add MemoryView test utilities
* Add test of rb_memory_view_fill_contiguous_strides
* Skip spaces in format string
* Support endianness specifiers
* Update documentation
* Support alignment
* Use RUBY_ALIGNOF
* Fix format parser to follow the pack format
* Support the _ modifier
* Parse count specifiers in get_format_size function.
* Use STRUCT_ALIGNOF
* Fix test
* Fix test
* Fix total size for the case with tail padding
* Fix rb_memory_view_get_item_pointer
* Fix rb_memory_view_parse_item_format again
Notes:
Merged-By: mrkn <mrkn@ruby-lang.org>
|
|
C++ compilers are optional. Skip C++ tests when they are absent.
Notes:
Merged: https://github.com/ruby/ruby/pull/3570
|
|
Check if RUBY_ALIGNOF(double) is the alignment to store a double inside
of a struct.
Notes:
Merged: https://github.com/ruby/ruby/pull/3570
|
|
Pointed out by Coverity Scan
```
** CID 1466646: Control flow issues (MISSING_BREAK)
/ext/-test-/random/loop.c: 63 in loop_get_bytes()
```
|
|
To enclose the initialization of Random::Base part.
Notes:
Merged: https://github.com/ruby/ruby/pull/3024
|
|
Added `WITH_REAL` versions to `RB_RANDOM_INTERFACE` macros. Also
these macros including "without real" versions no longer contain
the terminator (semicolon and comma).
Notes:
Merged: https://github.com/ruby/ruby/pull/3024
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3024
|
|
* random.c: separate abstract rb_random_t and rb_random_mt_t for
Mersenne Twister implementation.
* include/ruby/random.h: the interface for extensions of Random
class.
* DLL imported symbol reference is not constant on Windows.
* check if properly initialized.
Notes:
Merged: https://github.com/ruby/ruby/pull/3024
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3347
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3346
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3338
|
|
I found a way to suppress particular kind of warnings via pragmas.
Notes:
Merged: https://github.com/ruby/ruby/pull/3433
|
|
|
|
To fix build failures.
Notes:
Merged: https://github.com/ruby/ruby/pull/3079
|
|
This shall fix compile errors.
Notes:
Merged: https://github.com/ruby/ruby/pull/3079
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3011
|
|
Split ruby.h
Notes:
Merged-By: shyouhei <shyouhei@ruby-lang.org>
|
|
Since 0c2d81dada, not all trace events are cleared during VM teardown.
This causes a crash when there is a tracepoint for
`RUBY_INTERNAL_EVENT_GC_EXIT` active during teardown.
The commit looks like a refactoring commit so I think this change was
unintentional.
[Bug #16682]
Notes:
Merged: https://github.com/ruby/ruby/pull/2959
|
|
* Otherwise it might segfault, since C has no idea of the type of varargs,
and the C code must assume all varargs are VALUE.
|
|
We would like to skip this extension library when libstdc++ is missing.
To avoid such situation let's use try_link instead of try_compile.
|
|
The `cxx.try_compile` command in this file kicks `cxx.have_devel?`
internally, which recursively calls `cxx.try_link` with a different
source code. We don't want that happen (the source code compiled in
this file must be the first one). We need to fake the system.
|
|
Function pointers are not void*. See also
ce4ea956d24eab5089a143bba38126f2b11b55b6
8427fca49bd85205f5a8766292dd893f003c0e48
|
|
DEBUG: BUILDSTDERR: /usr/bin/ld: infinite_loop_dlsym.o: in function `native_loop_dlsym':
DEBUG: BUILDSTDERR: /builddir/build/BUILD/ruby-2.7.0/ext/-test-/popen_deadlock/infinite_loop_dlsym.c:16: undefined reference to `dlsym'
DEBUG: BUILDSTDERR: collect2: error: ld returned 1 exit status
Ruby was built with LibreSSL.
Notes:
Merged: https://github.com/ruby/ruby/pull/2862
|
|
Was my mistake to put return here.
|