summaryrefslogtreecommitdiff
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/psych] Fix libyaml download failure rescue under minirubyAlan Wu2022-06-151-7/+9
| | | | | | | | | | | | | | | | | | | | | | | I tried to build Ruby on a system without libyaml today and realized that my attempt from <https://github.com/ruby/psych/pull/557> doesn't fix the error in <https://github.com/ruby/psych/issues/552>. I still got the same `LoadError` from `digest` which stopped the build. Since `LoadError` is not a `StandardError`, a plain `rescue` doesn't catch it. Catch `LoadError` explicitly instead and reduce the scope of the `begin` block. I tested this change in a Ruby build on macOS without libyaml installed and confirmed that `make` continues with a warning instead of aborting: *** Following extensions are not compiled: psych: Could not be configured. It will not be installed. ... This should address <https://bugs.ruby-lang.org/issues/18790>. https://github.com/ruby/psych/commit/251289ba83
* Make method id explicit in rb_exec_recursive_outerJohn Hawthorn2022-06-101-1/+1
| | | | | | | | | | | | | | Previously, because opt_aref and opt_aset don't push a frame, when they would call rb_hash to determine the hash value of the key, the initial level of recursion would incorrectly use the method id at the top of the stack instead of "hash". This commit replaces rb_exec_recursive_outer with rb_exec_recursive_outer_mid, which takes an explicit method id, so that we can make the hash calculation behave consistently. rb_exec_recursive_outer was documented as being internal, so I believe this should be okay to change.
* [Feature #18339] GVL Instrumentation APIJean Boussier2022-06-033-0/+261
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ref: https://bugs.ruby-lang.org/issues/18339 Design: - This tries to minimize the overhead when no hook is registered. It should only incur an extra unsynchronized boolean check. - The hook list is protected with a read-write lock as to cause contention when some hooks are registered. - The hooks MUST be thread safe, and MUST NOT call into Ruby as they are executed outside the GVL. - It's simply a noop on Windows. API: ``` rb_internal_thread_event_hook_t * rb_internal_thread_add_event_hook(rb_internal_thread_event_callback callback, rb_event_flag_t internal_event, void *user_data); bool rb_internal_thread_remove_event_hook(rb_internal_thread_event_hook_t * hook); ``` You can subscribe to 3 events: - READY: called right before attempting to acquire the GVL - RESUMED: called right after successfully acquiring the GVL - SUSPENDED: called right after releasing the GVL. The hooks MUST be threadsafe, as they are executed outside of the GVL, they also MUST NOT call any Ruby API.
* [ruby/nkf] Constified invariant tablesNobuyoshi Nakada2022-06-031-7/+7
| | | | https://github.com/ruby/nkf/commit/b386ddc11c
* [ruby/stringio] Fix extracting encoding names in the fallback codeNobuyoshi Nakada2022-05-301-2/+7
| | | | https://github.com/ruby/stringio/commit/0fe2e0c1e5
* [ruby/stringio] Accept external and internal encodings pairNobuyoshi Nakada2022-05-301-1/+8
| | | | | | Fix https://github.com/ruby/stringio/pull/16 https://github.com/ruby/stringio/commit/c8a69e80d2
* [ruby/stringio] Fix handling of chomp with paragraph separatorJeremy Evans2022-05-301-12/+15
| | | | | | | | | | Try to mirror IO behavior, where chomp takes out the entire paragraph separators between entries, but does not chomp a single line separator at the end of the string. Partially Fixes [Bug #18768] https://github.com/ruby/stringio/commit/a83ddbb7f0
* [ruby/stringio] Update ext/stringio/stringio.cJeremy Evans2022-05-301-1/+2
| | | | | https://github.com/ruby/stringio/commit/1edc88587e Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
* [ruby/stringio] Ignore chomp keyword for nil separatorJeremy Evans2022-05-301-1/+4
| | | | | | | | | nil separator means no separator at all, so nothing should be chomped. Partial fix for Ruby [Bug #18770] https://github.com/ruby/stringio/commit/feaa2ec631
* [ruby/stringio] Fix each with multiple character string and chompJeremy Evans2022-05-301-2/+3
| | | | | | | | | | Previously, this could result in an infinite loop. Always update the e pointer in this case, setting w when chomping so the chomped data is not included in the output. Fixes [Bug #18769] https://github.com/ruby/stringio/commit/4bf64d5130
* [ruby/stringio] Fix expanding size at ungetc/ungetbyteNobuyoshi Nakada2022-05-301-1/+1
| | | | https://github.com/ruby/stringio/commit/a35268a3ac
* [ruby/date] Constify gperf-generated tableNobuyoshi Nakada2022-05-241-1/+1
| | | | https://github.com/ruby/date/commit/6d7ab08ffc
* Merge JRuby implementation for stringio and io-waitHiroshi SHIBATA2022-05-202-9/+28
|
* Merge https://github.com/ruby/pathname/pull/8 for pathnameHiroshi SHIBATA2022-05-201-3/+4
|
* [ruby/io-nonblock] Remove unnecessary files from the gemNobuyoshi Nakada2022-05-201-8/+8
| | | | https://github.com/ruby/io-nonblock/commit/3850a4c7ac
* [ruby/io-nonblock] Rename `io_nonblock_mode` and extract `set_fcntl_flags`Nobuyoshi Nakada2022-05-201-9/+14
| | | | https://github.com/ruby/io-nonblock/commit/22f08574df
* [flori/json] Bump version to 2.6.2Florian Frank2022-05-202-2/+2
| | | | https://github.com/flori/json/commit/5de358f655
* [flori/json] Fix parser bug for empty string allocationAndrew Bromwich2022-05-202-0/+16
| | | | | | | | | | When `HAVE_RB_ENC_INTERNED_STR` is enabled it is possible to pass through a null pointer to `rb_enc_interned_str` resulting in a segfault Fixes #495 https://github.com/flori/json/commit/b59368a8c2
* [flori/json] Doc: Improve documentation on JSON#parse and JSON#parse!Hiroshi SHIBATA2022-05-202-0/+2
| | | | | | https://github.com/flori/json/commit/75ada77b96 Co-authored-by: Bruno Gomes da Silva <brunojabs@gmail.com>
* [ruby/psych] Prepare to develop 5.0.0Hiroshi SHIBATA2022-05-181-1/+1
| | | | https://github.com/ruby/psych/commit/c3b5183f42
* [ruby/psych] [CI] Add/update 'rake install', update Psych version for Ruby ↵MSP-Greg2022-05-181-1/+1
| | | | | | 3.1 gem install https://github.com/ruby/psych/commit/2fa5e190b5
* [ruby/psych] tr is typically 4 to 5 times faster than gsubMSP-Greg2022-05-101-2/+2
| | | | https://github.com/ruby/psych/commit/8533be8fe7
* [ruby/io-wait] bump up to 0.2.3Hiroshi SHIBATA2022-05-091-1/+1
| | | | https://github.com/ruby/io-wait/commit/f59d1d12e0
* [ruby/stringio] bump up to 3.0.3Sutou Kouhei2022-05-091-1/+1
| | | | https://github.com/ruby/stringio/commit/64f225bf00
* [ruby/stringio] Bump versionSutou Kouhei2022-05-091-1/+1
| | | | https://github.com/ruby/stringio/commit/b79152d08f
* Rust YJITAlan Wu2022-04-272-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In December 2021, we opened an [issue] to solicit feedback regarding the porting of the YJIT codebase from C99 to Rust. There were some reservations, but this project was given the go ahead by Ruby core developers and Matz. Since then, we have successfully completed the port of YJIT to Rust. The new Rust version of YJIT has reached parity with the C version, in that it passes all the CRuby tests, is able to run all of the YJIT benchmarks, and performs similarly to the C version (because it works the same way and largely generates the same machine code). We've even incorporated some design improvements, such as a more fine-grained constant invalidation mechanism which we expect will make a big difference in Ruby on Rails applications. Because we want to be careful, YJIT is guarded behind a configure option: ```shell ./configure --enable-yjit # Build YJIT in release mode ./configure --enable-yjit=dev # Build YJIT in dev/debug mode ``` By default, YJIT does not get compiled and cargo/rustc is not required. If YJIT is built in dev mode, then `cargo` is used to fetch development dependencies, but when building in release, `cargo` is not required, only `rustc`. At the moment YJIT requires Rust 1.60.0 or newer. The YJIT command-line options remain mostly unchanged, and more details about the build process are documented in `doc/yjit/yjit.md`. The CI tests have been updated and do not take any more resources than before. The development history of the Rust port is available at the following commit for interested parties: https://github.com/Shopify/ruby/commit/1fd9573d8b4b65219f1c2407f30a0a60e537f8be Our hope is that Rust YJIT will be compiled and included as a part of system packages and compiled binaries of the Ruby 3.2 release. We do not anticipate any major problems as Rust is well supported on every platform which YJIT supports, but to make sure that this process works smoothly, we would like to reach out to those who take care of building systems packages before the 3.2 release is shipped and resolve any issues that may come up. [issue]: https://bugs.ruby-lang.org/issues/18481 Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com> Co-authored-by: Noah Gibbs <the.codefolio.guy@gmail.com> Co-authored-by: Kevin Newton <kddnewton@gmail.com>
* io.nonblock returns the block's value [ci skip]Kazuhiro NISHIYAMA2022-04-261-2/+2
|
* add description for IO.nonblock=.Tanaka Akira2022-04-241-0/+40
|
* [ruby/pathname] Implement Pathname#lutimeAkinori MUSHA2022-04-211-0/+17
| | | | https://github.com/ruby/pathname/commit/268cb5acff
* [ruby/bigdecimal] Fix docsPeter Zhu2022-04-181-3/+3
| | | | | | rdoc parses f[i] as a link, which results in a broken link. https://github.com/ruby/bigdecimal/commit/a18522e9ca
* [ruby/bigdecimal] Adjust a local variable type to exponentNobuyoshi Nakada2022-04-181-1/+1
| | | | https://github.com/ruby/bigdecimal/commit/70146fb6ad
* Get rid of doubly cachingNobuyoshi Nakada2022-04-171-1/+1
|
* Get rid of magic numbersNobuyoshi Nakada2022-04-171-14/+16
|
* [ruby/stringio] bump up to 3.0.2.pre1Sutou Kouhei2022-04-161-1/+1
| | | | https://github.com/ruby/stringio/commit/14ec9bc193
* [ruby/nkf] Fix docsPeter Zhu2022-04-151-5/+5
| | | | | | | rdoc parses "Z[0-3]" as a link to "0-3", this commit escapes these so that they don't become links. https://github.com/ruby/nkf/commit/269c10061b
* Update PTY.spawn's documentStan Lo2022-04-131-4/+11
| | | | | Passing the optional env hash to PTY.spawn has been supported for years, but it's never documented. More info: https://bugs.ruby-lang.org/issues/12312
* [ruby/psych] Update autoconf files bundled with yaml-2.5Nobuyoshi Nakada2022-04-071-1/+5
| | | | https://github.com/ruby/psych/commit/e28f17ac18
* Move the target directory of bundled gems like as rubygemsNobuyoshi Nakada2022-04-071-1/+5
|
* Bundled gems are expanded under `.bundle/gems` nowNobuyoshi Nakada2022-04-071-6/+7
|
* Ignore yaml sourceHiroshi SHIBATA2022-04-051-0/+1
|
* Removed mswin patch for zlib-1.2.11Hiroshi SHIBATA2022-04-051-95/+0
|
* [ruby/psych] Improve libyaml source downloading error messagesAlan Wu2022-04-051-4/+10
| | | | | | | | | | | | People trying to build CRuby by following the instructions in its [README] have been running into [errors] due to missing `libyaml` on their system. Let's try to present a better error message when it happens. [README]: https://github.com/ruby/ruby/tree/fb5aa31e2d20ea8e1425432672f4de4c8ca2c26b#how-to-compile-and-install [errors]: https://github.com/ruby/psych/issues/552 https://github.com/ruby/psych/commit/20a633028e
* [ruby/psych] Propagate `CC` to libyamlNobuyoshi Nakada2022-04-041-0/+1
| | | | | | | | It is needed for cross-compiling to set properly. Just `--target`/`--host`/`--build` seems insufficient on some platforms. https://github.com/ruby/psych/commit/2d00c0c203
* [ruby/zlib] Use `z_size_t` version functionsNobuyoshi Nakada2022-04-022-3/+13
| | | | https://github.com/ruby/zlib/commit/1ce6625fff
* [ruby/zlib] Mask checksums to lower 32bits on also IL32 platformsNobuyoshi Nakada2022-04-021-1/+1
| | | | https://github.com/ruby/zlib/commit/e1ead85113
* [ruby/zlib] Mask checksums to lower 32bitsNobuyoshi Nakada2022-04-021-3/+9
| | | | | | Upper bits affect the result of `crc32` in zlib 1.2.12. https://github.com/ruby/zlib/commit/9ab6d04af1
* [ruby/psych] Output libyaml configure logNobuyoshi Nakada2022-04-011-7/+10
| | | | https://github.com/ruby/psych/commit/c2e3c8579c
* [ruby/psych] Make a static library from PIC object filesNobuyoshi Nakada2022-03-312-2/+11
| | | | | | | On some platforms, PIC and non-PIC code are incompatible and the latter cannot be used for shared objects. https://github.com/ruby/psych/commit/5652e32733
* [ruby/psych] Remove `unknown` vendor for cross-compiling tool prefixNobuyoshi Nakada2022-03-311-1/+1
| | | | https://github.com/ruby/psych/commit/a4ffa06646
* [ruby/psych] Propagate the host configuration to libyamlNobuyoshi Nakada2022-03-301-0/+1
| | | | https://github.com/ruby/psych/commit/0e37e19707