summaryrefslogtreecommitdiff
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* Stop defining `RUBY_ABI_VERSION` if released versionsNobuyoshi Nakada2022-08-121-0/+1
| | | | | | As commented in include/ruby/internal/abi.h, since teeny versions of Ruby should guarantee ABI compatibility, `RUBY_ABI_VERSION` has no role in released versions of Ruby.
* Fix Array#[] with ArithmeticSequence with negative steps (#5739)Jeremy Evans2022-08-113-0/+182
| | | | | | | | | | | | | | | | | | | | | | * Fix Array#[] with ArithmeticSequence with negative steps Previously, Array#[] when called with an ArithmeticSequence with a negative step did not handle all cases correctly, especially cases involving infinite ranges, inverted ranges, and/or exclusive ends. Fixes [Bug #18247] * Add Array#slice tests for ArithmeticSequence with negative step to test_array Add tests of rb_arithmetic_sequence_beg_len_step C-API function. * Fix ext/-test-/arith_seq/beg_len_step/depend * Rename local variables * Fix a variable name Co-authored-by: Kenta Murata <3959+mrkn@users.noreply.github.com>
* [ruby/psych] Raise specific error when an anchor isn't definedAlexander Momchilov2022-08-092-1/+8
| | | | https://github.com/ruby/psych/commit/98fbd5247a
* [ruby/psych] Raise specific error when aliases are not enabledAlexander Momchilov2022-08-093-2/+9
| | | | https://github.com/ruby/psych/commit/0c11ddcf46
* [ruby/date] bump up to 3.2.3Nobuyoshi Nakada2022-08-081-1/+1
| | | | https://github.com/ruby/date/commit/dff37b3dd1
* [ruby/date] Fix Time#to_datetime before calendar reformNobuyoshi Nakada2022-08-081-4/+9
| | | | | | | | | | Time is always in the proleptic Gregorian calendar. Also DateTime#to_time should convert to the Gregorian calendar first, before extracting its components. https://bugs.ruby-lang.org/issues/18946#change-98527 https://github.com/ruby/date/commit/b2aee75248
* [DOC] New doc about Julian/Gregorian (#70)Burdette Lamar2022-08-071-67/+20
|
* Create temporary file exclusively and cleanNobuyoshi Nakada2022-08-071-2/+7
|
* Resolve abi symbol references from miniruby to avoid circular depsYuta Saito2022-08-041-1/+1
| | | | | | | | | | | | | | | | | | Adding `ruby` to `PREP` causes the following circular dependencies because `PREP` is used as a prerequisite by some targets required to build `ruby` target itself. ``` make: Circular .rbconfig.time <- ruby dependency dropped. make: Circular builtin_binary.inc <- ruby dependency dropped. make: Circular ext/extinit.c <- ruby dependency dropped. make: Circular ruby <- ruby dependency dropped. ``` Adding a new Make variable like `EXTPREP` only for exts may be also reasonable, but it would introduce another complexity into our build system. `-bundle_loader` doesn't care that link-time and run-time loader executables are different as long as bound symbols are provided, so it's ok to resolve from miniruby to simplify our build.
* Use $(bindir) for path to executable in mkmfAlan Wu2022-08-041-1/+1
| | | | | | | | | | | | | | | | For the macOS -bundle_loader linker option, we need a path to the Ruby exectuable. $(RUBY) is not necessarily a path since it could be a command line invocation. That happens during build with runruby.rb and can happen post installation if the user passes the --ruby option to a extconf.rb. Use $(bindir) to locate the executable instead. Before installation, $(bindir) doesn't exist, so we need to be able to override $(BUILTRUBY) in such situations so test-spec and bundled extensions could build. Use a new mkmf global, $builtruby, to do this; set it in fake.rb and in extmk.rb. Our build system is quite complex...
* Link ext bundles with bundle loader option for newer ld64Yuta Saito2022-08-041-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ld64 shipped with Xcode 14 emits a warning when using `-undefined dynamic_lookup`. ``` ld: warning: -undefined dynamic_lookup may not work with chained fixups ``` Actually, `-undefined dynamic_lookup` doesn't work when: 1. Link a *shared library* with the option 2. Link it with a program that uses the chained-fixup introduced from macOS 12 and iOS 15 because `-undefined dynamic_lookup` uses lazy-bindings and they won't be bound while dyld fixes-up by traversing chained-fixup info. However, we build exts as *bundles* and they are loaded only through `dlopen`, so it's safe to use `-undefined dynamic_lookup` in theory. So the warning produced by ld64 is false-positive, and it results failure of option checking in configuration. Therefore, it would be an option to ignore the warning during our configuration. On the other hand, `-undefined dynamic_lookup` is already deprecated on all darwin platforms except for macOS, so it's good time to get rid of the option. ld64 also provides `-bundle_loader <executable>` option, which allows to resolve symbols defined in the executable symtab while linking. It behaves almost the same with `-undefined dynamic_lookup`, but it makes the following changes: 1. Require that unresolved symbols among input objects must be defined in the executable. 2. Lazy symbol binding will lookup only the symtab of the bundle loader executable. (`-undefined dynamic_lookup` lookups all symtab as flat namespace) This patch adds `-bundle_loader $(RUBY)` when non-EXTSTATIC configuration by assuming ruby executable can be linked before building exts. See "New Features" subsection under "Linking" section for chained fixup https://developer.apple.com/documentation/xcode-release-notes/xcode-13-release-notes
* [ruby/bigdecimal] Updated to use the correct spec for muilti licenseThomas Winsnes2022-08-031-1/+1
| | | | https://github.com/ruby/bigdecimal/commit/13165b29b8
* Updated to use multiple licensesThomas Winsnes2022-08-031-1/+1
| | | | Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
* [ruby/date] Enhanced RDoc (https://github.com/ruby/date/pull/69)Burdette Lamar2022-08-031-17/+46
| | | | | | | | | Treats: ::_strptime ::strptime Adds 'Related' entry to some methods' doc. https://github.com/ruby/date/commit/a6c2129273
* [ruby/date] [DOC] Enhanced RDoc for parser methods ↵Burdette Lamar2022-08-031-98/+130
| | | | | | | | | | | | | | | | | | | | | | (https://github.com/ruby/date/pull/68) Treats: ::_httpdate ::_iso8601 ::_jisx0301 ::_parse ::_rfc2822 ::_rfc3339 ::_xmlschema ::httpdate ::iso8601 ::jisx0301 ::parse ::rfc2822 ::rfc3339 ::xmlschema https://github.com/ruby/date/commit/24bdab600a
* respect current frame of `rb_eval_string`Koichi Sasada2022-08-012-0/+15
| | | | | | | `self` is nearest Ruby method's `self`. If there is no ruby frame, use toplevel `self` (`main`). https://bugs.ruby-lang.org/issues/18780
* [ruby/date] Enhanced RDoc (https://github.com/ruby/date/pull/67)Burdette Lamar2022-07-311-10/+34
| | | | | | | | | | | Treats: ::httpdate #to_date #to_time #to_datetime In behalf of ::httpdate, I've introduced section "Argument limit" that can be pointed to by various Date methods (similar to existing section "Argument start"). This will involve 8 already-enhanced methods plus 8 more not yet done. https://github.com/ruby/date/commit/00326ff99c
* Revert "* expand tabs. [ci skip]"Nobuyoshi Nakada2022-07-301-14/+14
| | | | This reverts commit 0d842fecb4f75ab3b1d4097ebdb8e88f51558041.
* * expand tabs. [ci skip]git2022-07-301-14/+14
| | | | | Tabs were expanded because the file did not have any tab indentation in unedited lines. Please update your editor config, and use misc/expand_tabs.rb in the pre-commit hook.
* [ruby/io-nonblock] Revert tab expansionNobuyoshi Nakada2022-07-301-14/+14
|
* Revert "* expand tabs. [ci skip]"Hiroshi SHIBATA2022-07-308-1033/+1033
| | | | This reverts commit 8a65cf3b61c60e4cb886f59a73ff6db44364bfa9.
* * expand tabs. [ci skip]git2022-07-308-1033/+1033
| | | | | Tabs were expanded because the file did not have any tab indentation in unedited lines. Please update your editor config, and use misc/expand_tabs.rb in the pre-commit hook.
* [ruby/digest] Revert tab-expansion in external filesNobuyoshi Nakada2022-07-308-1033/+1033
| | | | https://github.com/ruby/digest/commit/5ca2b5b91e
* [ruby/date] [DOC] Enhanced RDoc (https://github.com/ruby/date/pull/66)Burdette Lamar2022-07-301-51/+93
| | | | | | | | | | | | | | | | Treats: #=== #to_s #inspect #strftme #asctime #iso3601 #rfc3339 #rfc2822 #httpdate #jisx0301 https://github.com/ruby/date/commit/aed66fedf6
* [flori/json] Stop including the parser source __LINE__ in exceptionsJean Boussier2022-07-293-16/+16
| | | | | | | | It makes testing for JSON errors very tedious. You either have to use a Regexp or to regularly update all your assertions when JSON is upgraded. https://github.com/flori/json/commit/de9eb1d28e
* [ruby/date] [DOC] Enhanced RDoc for <=> (https://github.com/ruby/date/pull/65)Burdette Lamar2022-07-291-10/+34
| | | | https://github.com/ruby/date/commit/0cdbaa92e9
* [ruby/pathname] Fix `autoload` of `FileUtils`Nobuyoshi Nakada2022-07-271-2/+2
| | | | | | Should not be `Pathname::FileUtils`. https://github.com/ruby/pathname/commit/d1eb366e73
* Adjust styles [ci skip]Nobuyoshi Nakada2022-07-272-2/+4
|
* Manually sync with https://github.com/ruby/date/pull/64Hiroshi SHIBATA2022-07-273-50/+109
|
* Rename rb_ary_tmp_new to rb_ary_hidden_newPeter Zhu2022-07-262-2/+2
| | | | | | rb_ary_tmp_new suggests that the array is temporary in some way, but that's not true, it just creates an array that's hidden and not on the transient heap. This commit renames it to rb_ary_hidden_new.
* Fix `rb_profile_frames` output includes dummy main thread frameIvo Anjo2022-07-261-0/+1
| | | | | | | | | | | | | | | | | | | | The `rb_profile_frames` API did not skip the two dummy frames that each thread has at its beginning. This was unlike `backtrace_each` and `rb_ec_parcial_backtrace_object`, which do skip them. This does not seem to be a problem for non-main thread frames, because both `VM_FRAME_RUBYFRAME_P(cfp)` and `rb_vm_frame_method_entry(cfp)` are NULL for them. BUT, on the main thread `VM_FRAME_RUBYFRAME_P(cfp)` was true and thus the dummy thread was still included in the output of `rb_profile_frames`. I've now made `rb_profile_frames` skip this extra frame (like `backtrace_each` and friends), as well as add a test that asserts the size and contents of `rb_profile_frames`. Fixes [Bug #18907] (<https://bugs.ruby-lang.org/issues/18907>)
* Make extensions under `Gem.extension_api_version` directoryNobuyoshi Nakada2022-07-241-1/+2
|
* Adjust indents [ci skip]Nobuyoshi Nakada2022-07-222-6/+7
|
* Get rid of magic numbersNobuyoshi Nakada2022-07-221-6/+10
|
* Dump non-ASCII char as unsignedNobuyoshi Nakada2022-07-221-1/+1
| | | | Non-ASCII code may be negative on platforms plain char is signed.
* Revert "objspace_dump.c: skip dumping method name if not pure ASCII"Jean byroot Boussier2022-07-211-4/+2
| | | | This reverts commit 79406e3600862bbb6dcdd7c5ef8de1978e6f916c.
* objspace_dump.c: skip dumping method name if not pure ASCIIJean Boussier2022-07-211-2/+4
| | | | | | | | | | | | Sidekiq has a method named `❨╯°□°❩╯︵┻━┻`which corrupts heap dumps. Normally we could just dump is as is since it's valid UTF-8 and need no escaping. But our code to escape control characters isn't UTF-8 aware so it's more complicated than it seems. Ultimately since the overwhelming majority of method names are pure ASCII, it's not a big loss to just skip it.
* Expand tabs [ci skip]Takashi Kokubun2022-07-2169-3450/+3450
| | | | [Misc #18891]
* Avoid to symlink under symlinkNobuyoshi Nakada2022-07-161-1/+1
|
* Move copying/linking extra files to Makefile so removed by `clean`Nobuyoshi Nakada2022-07-161-33/+48
|
* Ensure symlinks to bundled gem with exts have parent dirYuta Saito2022-07-151-0/+1
| | | | | | | | | | When configuring with `--disable-rpath` and `--static-linked-ext` (e.g. building for WASI), `extmk.rb` doesn't build exts under bundled gems, and `.bundle/gems/#{gemname}-#{ver}` are not created due to no call of `extmake`. b2491783986084770f6f97552f27b868622730cf starts creating symlink at `.bundle/gems/#{gemname}-#{ver}/lib`, but the parent dir is not created, so configuration aginst debug and rbs gems were failed.
* [ruby/psych] Fix infinite loop bug after YAML_MEMORY_ERROR (psych issue #440)Karl Anderson2022-07-151-13/+17
| | | | https://github.com/ruby/psych/commit/6c56700fb2
* [ruby/bigdecimal] Remove checks for `struct RRational` and `struct RComplex`Nobuyoshi Nakada2022-07-142-6/+4
| | | | | | | | These are used to see only if `RRATIONAL` and `RCOMPLEX` are available, however, these two are macros and can be checked with `#ifdef` directly. https://github.com/ruby/bigdecimal/commit/175bbacd43
* Install gems `lib` directory to build pathNobuyoshi Nakada2022-07-141-0/+19
|
* Make dependency-free gemspec filesNobuyoshi Nakada2022-07-141-0/+11
| | | | | | | The default gems have not been installed yet in the build directory, bundled gems depending on them can not work. As those dependencies should be usable there even without rubygems, make temporary gemspec files without the dependencies, and use them in the build directory.
* Move timestamps directory for bundled gemsNobuyoshi Nakada2022-07-131-1/+4
|
* [ruby/date] [DOC] Enhanced RDoc (https://github.com/ruby/date/pull/63)Burdette Lamar2022-07-121-64/+78
| | | | | | | | | | | | | | | | Treats: #next #<< #>> #next_month #prev_month #next_year #prev_year #step #upto #downto https://github.com/ruby/date/commit/4246441a35
* [ruby/date] [DOC] Enhanced RDoc (https://github.com/ruby/date/pull/62)Burdette Lamar2022-07-121-33/+57
| | | | | | Minor edits to 11 methods' documentation. https://github.com/ruby/date/commit/00bb7f6648
* [ruby/date] Enhanced RDoc (https://github.com/ruby/date/pull/61)Burdette Lamar2022-07-101-0/+1
| | | | | | Omit private aliases from Rdoc. https://github.com/ruby/date/commit/48f9180663
* [ruby/date] [DOC] Enhanced RDoc (https://github.com/ruby/date/pull/59)Burdette Lamar2022-07-091-55/+69
| | | | | | Minor changes (mostly doc-guide compliance) to 18 or so of simpler methods (getters). https://github.com/ruby/date/commit/00e37ba2b4