summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2023-06-12[ruby/psych] Comment out the code used to expand the file list [ci skip]Nobuyoshi Nakada
https://github.com/ruby/psych/commit/715f3bfad0
2023-06-12Add missing dependenciesNobuyoshi Nakada
2023-06-12[Feature #19719] Universal Parseryui-knk
Introduce Universal Parser mode for the parser. This commit includes these changes: * Introduce `UNIVERSAL_PARSER` macro. All of CRuby related functions are passed via `struct rb_parser_config_struct` when this macro is enabled. * Add CI task with 'cppflags=-DUNIVERSAL_PARSER' for ubuntu. Notes: Merged: https://github.com/ruby/ruby/pull/7927
2023-06-12[ruby/psych] Update spec filesNobuyoshi Nakada
https://github.com/ruby/psych/commit/ba6fc48591
2023-06-08Add deprecations for public `struct rb_io` members. (#7916)Samuel Williams
* Add deprecations for public struct rb_io members. Notes: Merged-By: ioquatix <[email protected]>
2023-06-08racc/cparse is extracted from ruby/ruby repositoryHiroshi SHIBATA
2023-06-08Try to promote racc as bundled gemsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7877
2023-06-08[ruby/psych] Drop to support Ruby 2.4 because the latest version of ↵Hiroshi SHIBATA
core_assertions only support Ruby 2.5+ https://github.com/ruby/psych/commit/6ec316b7fa
2023-06-06Unify length field for embedded and heap strings (#7908)Peter Zhu
* Unify length field for embedded and heap strings The length field is of the same type and position in RString for both embedded and heap allocated strings, so we can unify it. * Remove RSTRING_EMBED_LEN Notes: Merged-By: maximecb <[email protected]>
2023-06-05Revert "Revert "Fix cvar caching when class is cloned""eileencodes
This reverts commit 10621f7cb9a0c70e568f89cce47a02e878af6778. This was reverted because the gc integrity build started failing. We have figured out a fix so I'm reopening the PR. Original commit message: Fix cvar caching when class is cloned The class variable cache that was added in ruby#4544 changed the behavior of class variables on cloned classes. As reported when a class is cloned AND a class variable was set, and the class variable was read from the original class, reading a class variable from the cloned class would return the value from the original class. This was happening because the IC (inline cache) is stored on the ISEQ which is shared between the original and cloned class, therefore they share the cache too. To fix this we are now storing the `cref` in the cache so that we can check if it's equal to the current `cref`. If it's different we don't want to read from the cache. If it's the same we do. Cloned classes don't share the same cref with their original class. This will need to be backported to 3.1 in addition to 3.2 since the bug exists in both versions. We also added a marking function which was missing. Fixes [Bug #19379] Co-authored-by: Aaron Patterson <[email protected]> Notes: Merged: https://github.com/ruby/ruby/pull/7900
2023-06-03Ripper does not depend on Bison [ci skip]yui-knk
It also uses Lrama then no dependency on Bison. Notes: Merged: https://github.com/ruby/ruby/pull/7896
2023-06-02[ruby/stringio] Development of 3.0.8 started.Hiroshi SHIBATA
https://github.com/ruby/stringio/commit/1587d3698e
2023-06-02No need to define "BISON" on extconf.rbyui-knk
"BISON" is defined in "ext/ripper/depend". Notes: Merged: https://github.com/ruby/ruby/pull/7878
2023-06-01Revert "Fix cvar caching when class is cloned"Aaron Patterson
This reverts commit 77d1b082470790c17c24a2f406b4fec5d522636b.
2023-06-01Fix cvar caching when class is clonedeileencodes
The class variable cache that was added in https://github.com/ruby/ruby/pull/4544 changed the behavior of class variables on cloned classes. As reported when a class is cloned AND a class variable was set, and the class variable was read from the original class, reading a class variable from the cloned class would return the value from the original class. This was happening because the IC (inline cache) is stored on the ISEQ which is shared between the original and cloned class, therefore they share the cache too. To fix this we are now storing the `cref` in the cache so that we can check if it's equal to the current `cref`. If it's different we don't want to read from the cache. If it's the same we do. Cloned classes don't share the same cref with their original class. This will need to be backported to 3.1 in addition to 3.2 since the bug exists in both versions. We also added a marking function which was missing. Fixes [Bug #19379] Co-authored-by: Aaron Patterson <[email protected]> Notes: Merged: https://github.com/ruby/ruby/pull/7265
2023-06-01[ruby/stringio] Avoid direct struct usage.Samuel Williams
(https://github.com/ruby/stringio/pull/54) We will eventually want to refactor this, but for now this is compatible enough.
2023-06-01Restores the changes in `io-console` without breaking backwards ↵Samuel Williams
compatibility. (#7882) This reverts commit 35da41b29bf0a1a8fd2cd7e1d7fcb036ca8c2c7c. This updates `io-console` to avoid accessing the internal details of `rb_io_t` and instead use `rb_io_descriptor` and `rb_io_path` etc. Notes: Merged-By: ioquatix <[email protected]>
2023-06-01Hide the usage of `rb_io_t` where possible. (#7880)Samuel Williams
This retries the compatible parts of the previously reverted PR so we can continue to update related code without breaking backwards compatibility. Notes: Merged-By: ioquatix <[email protected]>
2023-06-01Revert https://github.com/ruby/io-console/pull/43Hiroshi SHIBATA
This reverts commit 1889133c04f337fec3969cb5040a544088249046 and commit 764207e47ce38d1b73774a8e65114c87bc888298. Followed up with https://github.com/ruby/ruby/commit/85dcc4866d9ff29834596e9186cc97d622ee06f8
2023-06-01Revert "Hide most of the implementation of `struct rb_io`. (#6511)"NARUSE, Yui
This reverts commit 18e55fc1e1ec20e8f3166e3059e76c885fc9f8f2. fix [Bug #19704] https://bugs.ruby-lang.org/issues/19704 This breaks compatibility for extension libraries. Such changes need a discussion.
2023-05-30[ruby/io-nonblock] Add TruffleRuby support and add it in CIBenoit Daloze
* Do not use a C extension on TruffleRuby for these 3 methods. https://github.com/ruby/io-nonblock/commit/1b8e52abfa
2023-05-30[ruby/io-nonblock] Use the correct pattern for the fallback of ↵Benoit Daloze
rb_io_descriptor() * See https://github.com/ruby/io-console/pull/43/commits/d1d9aef45ceb14365fdf0ebee3e5ea06f27da682 https://github.com/ruby/io-nonblock/commit/dadb42422b
2023-05-30Hide most of the implementation of `struct rb_io`. (#6511)Samuel Williams
* Add rb_io_path and rb_io_open_descriptor. * Use rb_io_open_descriptor to create PTY objects * Rename FMODE_PREP -> FMODE_EXTERNAL and expose it FMODE_PREP I believe refers to the concept of a "pre-prepared" file, but FMODE_EXTERNAL is clearer about what the file descriptor represents and aligns with language in the IO::Buffer module. * Ensure that rb_io_open_descriptor closes the FD if it fails If FMODE_EXTERNAL is not set, then it's guaranteed that Ruby will be responsible for closing your file, eventually, if you pass it to rb_io_open_descriptor, even if it raises an exception. * Rename IS_EXTERNAL_FD -> RUBY_IO_EXTERNAL_P * Expose `rb_io_closed_p`. * Add `rb_io_mode` to get IO mode. --------- Co-authored-by: KJ Tsanaktsidis <[email protected]> Notes: Merged-By: ioquatix <[email protected]>
2023-05-29[ruby/cgi] Add TruffleRuby support and add it in CIBenoit Daloze
https://github.com/ruby/cgi/commit/1240fec9c9
2023-05-29[ruby/etc] Use the correct pattern for the fallback of rb_io_descriptor()Benoit Daloze
* See https://github.com/ruby/io-console/pull/43/commits/d1d9aef45ceb14365fdf0ebee3e5ea06f27da682 https://github.com/ruby/etc/commit/5185685003
2023-05-29[ruby/openssl] Remove usage of IO internals.Samuel Williams
2023-05-29[ruby/io-console] Remove trailing whitespace.Samuel Williams
https://github.com/ruby/io-console/commit/55f1586463
2023-05-29[ruby/io-console] Remove usage of IO internals.Samuel Williams
(https://github.com/ruby/io-console/pull/43) https://github.com/ruby/io-console/commit/4b839a504f Co-authored-by: Benoit Daloze <[email protected]>
2023-05-28[ruby/io-nonblock] Remove usage of IO internals.Samuel Williams
(https://github.com/ruby/io-nonblock/pull/11) https://github.com/ruby/io-nonblock/commit/caa2b94d19
2023-05-28[ruby/io-nonblock] Revert "Remove usage of IO internals."Samuel Williams
This reverts commit https://github.com/ruby/io-nonblock/commit/9772b6dcb63c. https://github.com/ruby/io-nonblock/commit/08cabf78e1
2023-05-28[ruby/io-nonblock] Remove usage of IO internals.Samuel Williams
https://github.com/ruby/io-nonblock/commit/9772b6dcb6
2023-05-28[ruby/io-wait] Remove usage of IO internals.Samuel Williams
(https://github.com/ruby/io-wait/pull/25) https://github.com/ruby/io-wait/commit/e5854b46c7
2023-05-28[ruby/etc] Remove usage of IO internals.Samuel Williams
(https://github.com/ruby/etc/pull/26) https://github.com/ruby/etc/commit/ea15eceb13
2023-05-25[ruby/nkf] Bump up nkf-0.1.3Hiroshi SHIBATA
https://github.com/ruby/nkf/commit/bc90e2ed39
2023-05-25[ruby/nkf] Added mission extension configurationHiroshi SHIBATA
https://github.com/ruby/nkf/commit/e627a39dff
2023-05-24[flori/json] Call `super` in `included` hookUfuk Kayserilioglu
The C extension defines an `included` hook for the `JSON::Ext::Generator::GeneratorMethods::String` module but neglects to call `super` in the hook. This can break the functionality of various other code that rely on the fact that `included` on `Module` will always be called. https://github.com/flori/json/commit/cd8bbe56a3
2023-05-20`rb_bug` prints a newline after the messageNobuyoshi Nakada
2023-05-19[ruby/openssl] Fix warnings about the OPENSSL_FIPS macro in OpenSSL 1.1.Jun Aruga
The commit <https://github.com/ruby/openssl/commit/c5b2bc1268bc> made the warnings below in the case of OpenSSL 1.1 where the `OPENSSL_FIPS` macro is not defined. ``` $ bundle install --standalone $ bundle exec rake compile -- \ --with-openssl-dir=$HOME/.local/openssl-1.1.1t-debug \ --with-cflags="-Wundef" mkdir -p tmp/x86_64-linux/openssl/3.2.1 cd tmp/x86_64-linux/openssl/3.2.1 /usr/local/ruby-3.2.1/bin/ruby -I. -r.rake-compiler-siteconf.rb ../../../../ext/openssl/extconf.rb -- --with-openssl-dir=/home/jaruga/.local/openssl-1.1.1t-debug --with-cflags=-Wundef ... gcc -I. -I/usr/local/ruby-3.2.1/include/ruby-3.2.0/x86_64-linux -I/usr/local/ruby-3.2.1/include/ruby-3.2.0/ruby/backward -I/usr/local/ruby-3.2.1/include/ruby-3.2.0 -I../../../../ext/openssl -DRUBY_EXTCONF_H=\"extconf.h\" -I/home/jaruga/.local/openssl-1.1.1t-debug/include -fPIC -Wundef -o ossl.o -c ../../../../ext/openssl/ossl.c ../../../../ext/openssl/ossl.c: In function ‘ossl_fips_mode_get’: ../../../../ext/openssl/ossl.c:425:7: warning: "OPENSSL_FIPS" is not defined, evaluates to 0 [-Wundef] 425 | #elif OPENSSL_FIPS | ^~~~~~~~~~~~ ../../../../ext/openssl/ossl.c: In function ‘ossl_fips_mode_set’: ../../../../ext/openssl/ossl.c:460:7: warning: "OPENSSL_FIPS" is not defined, evaluates to 0 [-Wundef] 460 | #elif OPENSSL_FIPS | ^~~~~~~~~~~~ ../../../../ext/openssl/ossl.c: In function ‘Init_openssl’: ../../../../ext/openssl/ossl.c:1218:7: warning: "OPENSSL_FIPS" is not defined, evaluates to 0 [-Wundef] 1218 | #elif OPENSSL_FIPS | ^~~~~~~~~~~~ ... cp tmp/x86_64-linux/openssl/3.2.1/openssl.so tmp/x86_64-linux/stage/lib/openssl.so ``` https://github.com/ruby/openssl/commit/b4228cbcd6
2023-05-19[ruby/openssl] Implement FIPS functions on OpenSSL 3.Jun Aruga
This commit is to implement the `OpenSSL::OPENSSL_FIPS`, `ossl_fips_mode_get` and `ossl_fips_mode_set` to pass the test `test/openssl/test_fips.rb`. It seems that the `OPENSSL_FIPS` macro is not used on the FIPS mode case any more, and some FIPS related APIs also were removed in OpenSSL 3. See the document <https://github.com/openssl/openssl/blob/master/doc/man7/migration_guide.pod#removed-fips_mode-and-fips_mode_set> the section OPENSSL 3.0 > Main Changes from OpenSSL 1.1.1 > Other notable deprecations and changes - Removed FIPS_mode() and FIPS_mode_set() . The `OpenSSL::OPENSSL_FIPS` returns always true in OpenSSL 3 because the used functions `EVP_default_properties_enable_fips` and `EVP_default_properties_is_fips_enabled` works with the OpenSSL installed without FIPS option. The `TEST_RUBY_OPENSSL_FIPS_ENABLED` is set on the FIPS mode case on the CI. Because I want to test that the `OpenSSL.fips_mode` returns the `true` or 'false' surely in the CI. You can test the FIPS mode case by setting `TEST_RUBY_OPENSSL_FIPS_ENABLED` on local too. Right now I don't find a better way to get the status of the FIPS mode enabled or disabled for this purpose. I am afraid of the possibility that the FIPS test case is unintentionally skipped. I also replaced the ambiguous "returns" with "should return" in the tests. https://github.com/ruby/openssl/commit/c5b2bc1268
2023-05-15Process parse.y without temporary filesNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/7817
2023-05-14Add user argument to some macros used by bisonNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/7807
2023-05-14Preprocess input parse.y from stdinNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/7807
2023-05-12Use Lrama LALR parser generator instead of Bisonv3_3_0_preview1Yuichiro Kaneko
https://bugs.ruby-lang.org/issues/19637 Co-authored-by: Nobuyoshi Nakada <[email protected]> Notes: Merged: https://github.com/ruby/ruby/pull/7798 Merged-By: yui-knk <[email protected]>
2023-05-09Extract ext/readlineHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7781
2023-05-08[ruby/stringio] Drop support for ruby 2.6 or earlierNobuyoshi Nakada
(https://github.com/ruby/stringio/pull/47) `rb_io_extract_modeenc` has been exported since ruby 2.7.
2023-05-05Redirect to `IO::NULL` for the portabilityNobuyoshi Nakada
2023-05-03[ruby/stringio] Update write-barrier at copyingNobuyoshi Nakada
http://ci.rvm.jp/results/trunk-asserts@ruby-sp2-docker/4552803 ``` verify_internal_consistency_reachable_i: WB miss (O->Y) 0x00007f752ddd5550 [3LM ] strio (StringIO)strio -> 0x00007f752d19b7d0 [0 ] T_STRING (String) len: 8, capa: 15 "to_strio" <internal:/tmp/ruby/src/trunk-asserts/lib/rubygems/core_ext/kernel_require.rb>:53: [BUG] gc_verify_internal_consistency: found internal inconsistency. ``` https://github.com/ruby/stringio/commit/2e8ab43cba
2023-04-25[ruby/syslog] Improve the version extractionAkinori MUSHA
https://github.com/ruby/syslog/commit/34da65a002
2023-04-25[ruby/syslog] Raise required_ruby_versionAkinori MUSHA
https://github.com/ruby/syslog/commit/5289373016
2023-04-25[ruby/syslog] Expose Syslog::VERSIONHiroshi SHIBATA
https://github.com/ruby/syslog/commit/ff5d72fcb9