23 Commits

Author SHA1 Message Date
Satoshi Tagomori
f7b48456eb Box: show the fully qualified URL of the Ruby::Box doc 2025-12-24 15:10:25 +09:00
Nobuyoshi Nakada
d8b33993e1
Box: Fix an unused variable warning 2025-12-21 20:31:30 +09:00
Nobuyoshi Nakada
dd2f7d6ae6 [Bug #21794] Fix for platforms where O_CLOEXEC is not available 2025-12-19 19:48:43 +09:00
Luke Gruber
aace29d485
Check for NULL fields in TYPEDDATA memsize functions (#15633)
Some TYPEDDATA objects allocate struct fields using the GC right after
they get created, and in that case the VM can try to perform a GC and join
a barrier if another ractor started one. If we're dumping the heap in another
ractor, this acquires a barrier and it will call the `rb_obj_memsize` function on this
object. We can't assume these struct fields are non-null. This also goes for C extensions,
which may cause problems with heap dumping from a ractor if their memsize functions aren't
coded correctly to check for NULL fields. Because dumping the heap from a ractor is likely a
rare scenario and it has only recently been introduced, we'll have to see how this works in
practice and if it causes bugs.
2025-12-18 15:42:49 -05:00
Nobuyoshi Nakada
5f09e1f046 Box: [DOC] fix the class name in rdoc
Also remove a stale TODO.
2025-12-16 16:53:13 +09:00
Nobuyoshi Nakada
8db3642ab5 Box: fix the class name in inspect 2025-12-16 16:53:13 +09:00
Nobuyoshi Nakada
5a4faaaeb1 Merge root_box_data into root_box
* Make invariant `root_box` an array consist of only `root_box_data`.
* Remove the unnecessary initializer list that is just overwritten in
  `initialize_root_box()` and missing `classext_cow_classes`.
* Shrink the scope using another local `root_box`.
* Make the data type constants static.
2025-12-15 16:05:21 +09:00
Nobuyoshi Nakada
3636277dc5
Add NUM2PTR and PTR2NUM macros
These macros have been defined here and there, so collect them.
2025-12-10 12:09:50 +09:00
Nobuyoshi Nakada
573896a40a Box: remove copied extension files 2025-12-09 23:41:50 +09:00
Nobuyoshi Nakada
8d1eafa7a7 Remove duplicate path names in error message 2025-12-09 20:50:35 +09:00
Nobuyoshi Nakada
ee6784f289 Refine copy_ext_file
- Define the error constants.
- Use system calls to copy files if available.
- Simplify fallback copying.
- Copy without stdio buffering.
2025-12-09 20:50:35 +09:00
Satoshi Tagomori
9eafeaed67 Box: Free rb_classext_t struct for a box when the box is GCed 2025-12-02 23:49:49 +09:00
Satoshi Tagomori
75f8a116c9 Box: Fix data type name 2025-12-02 23:49:49 +09:00
Daisuke Fujimura (fd0)
9aa9cf8ea0 Fix switch fall-through in copy_ext_file_error 2025-11-30 21:03:00 +09:00
Stan Lo
4cd6661e18
Reorganize page documentations (#15154)
Re-organize page docs
2025-11-27 20:12:24 +00:00
Nobuyoshi Nakada
1738255f6d
[Misc #21688] [DOC] Include box.md in Ruby::Box documentation 2025-11-23 19:04:17 +09:00
Nobuyoshi Nakada
4a0e01d768
[Misc #21688] Teach RDoc about the toplevel module Ruby
Re-open the exising module by calling `rb_define_module`.
RDoc (`RDoc::Parser::C#do_classes_and_modules`) does not recognize
`rb_path2class` as a class/module definition.
2025-11-23 19:01:16 +09:00
Nobuyoshi Nakada
3a5e7e9580
Constify 2025-11-08 20:51:04 +09:00
Satoshi Tagomori
19d4663d2f Use RUBY_BOX environment variable instead of RUBY_NAMESPACE 2025-11-07 13:14:54 +09:00
Satoshi Tagomori
c4691ef061 Rename Namespace to Ruby::Box 2025-11-07 13:14:54 +09:00
Satoshi Tagomori
d2a587c791 renaming internal data structures and functions from namespace to box 2025-11-07 13:14:54 +09:00
Satoshi Tagomori
aaa1234702 update referenced filenames from namespace to box 2025-11-07 13:14:54 +09:00
Satoshi Tagomori
50b9d9d355 rename namespace.c (and others) to box.c 2025-11-07 13:14:54 +09:00