Commit graph

15017 commits

Author SHA1 Message Date
Aaron Patterson
640b162b51 Exit when the object is frozen
Exit when the object is frozen, also add tests
2021-10-20 18:19:39 -04:00
John Hawthorn
ce02aefabb Allow calling variadic cfuncs with many args
We have a check to ensure we don't have to push args on the stack to
call a cfunc with many args. However we never need to use the stack for
variadic cfuncs, so we shouldn't care about the number of arguments.
2021-10-20 18:19:39 -04:00
John Hawthorn
fd34c831f6 Allow special case of expandarray with nil 2021-10-20 18:19:39 -04:00
John Hawthorn
c210fade27 Implement newrange 2021-10-20 18:19:39 -04:00
John Hawthorn
3ecc6befcd Implement invokesuper using cfp->ep[ME] check
This fixes and re-enables invokesuper, replacing the existing guards
with a guard on the method entry for the EP.
2021-10-20 18:19:39 -04:00
John Hawthorn
812597676b Avoid immediate side exits in checktype
Previously checktype only supported heap objects, however it's not
uncommon to receive an immediate, for example when string interpolating
a Symbol or Integer.
2021-10-20 18:19:39 -04:00
eileencodes
2ba090a1f9 Add toregexp to yjit
The FIXME is there so we remember to investigate why insns clears the
temporary array. Is this necessary? If it's not we can remove it from
both.

Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2021-10-20 18:19:39 -04:00
John Hawthorn
e18b0b6eba Implement putspecialobject 2021-10-20 18:19:39 -04:00
John Hawthorn
3edf29668e Add opt_regexpmatch2 2021-10-20 18:19:39 -04:00
eileencodes
d2e8b99b5b Implement tostring instruction for yjit
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2021-10-20 18:19:38 -04:00
John Hawthorn
786e512178 Add regression test of invalid mapping merge
This should have referenced MAX_TEMP_TYPES, not MAX_LOCAL_TYPES.
2021-10-20 18:19:38 -04:00
eileencodes
b91078ea74 Add setglobal to yjit
Adds yjit support for setting global variables.

Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
Co-authored-by: John Hawthorn <john@hawthorn.email>
2021-10-20 18:19:38 -04:00
John Hawthorn
6aa4637272 Fix and uncomment getlocal test
Previously, under the scraper, this would side-exit because it was
returning to a C method. Now that we use the jit_func entrypoint, this
test no longer side-exits.
2021-10-20 18:19:38 -04:00
Maxime Chevalier-Boisvert
1891dcaa9f Add flag so we can easily tell if all stats avail. Comment out broken test. 2021-10-20 18:19:38 -04:00
Aaron Patterson
2a59bd7312 Disable YJIT in MJIT tests 2021-10-20 18:19:38 -04:00
John Hawthorn
adfecd8f4d Allow asserts on results, rather than stdout 2021-10-20 18:19:37 -04:00
John Hawthorn
9c9e23e277 Add assert_no_exits alias 2021-10-20 18:19:37 -04:00
John Hawthorn
4040ca8293 more testing 2021-10-20 18:19:37 -04:00
John Hawthorn
073e3b2eab Add test for recursion 2021-10-20 18:19:37 -04:00
John Hawthorn
7ed1e3ff0b Add test of yjit compilation 2021-10-20 18:19:37 -04:00
Maxime Chevalier-Boisvert
d2d564be1d Moved ujit code invalidation test into bootstraptest 2021-10-20 18:19:28 -04:00
Alan Wu
188c54428c MicroJIT: avoid having to invalidate running output code 2021-10-20 18:19:26 -04:00
Jeremy Evans
fac2c0f73c
Fix evaluation order of hash values for duplicate keys
Fixes [Bug #17719]

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Co-authored-by: Ivo Anjo <ivo@ivoanjo.me>
2021-10-18 09:09:07 -07:00
Kazuki Yamaguchi
cc8ff8b50d [ruby/openssl] require Ruby 2.6 or later
Drop support for Ruby 2.3, 2.4, and 2.5.

As of 2021-10, Ruby 2.6 is the oldest version that still receives
security fixes from the Ruby core team, so it doesn't make much sense
to keep code for those ancient versions.

3436bd040d
2021-10-16 19:39:13 +09:00
Kazuki Yamaguchi
e36906f9ab [ruby/openssl] test/openssl/test_ssl: use TLS 1.2 for finished_messages on LibreSSL
LibreSSL 2.2.x has a bug in the Finished message handling with TLS 1.3.
This is fixed by LibreSSL 3.3.2.

0bea59d245
2021-10-16 18:34:35 +09:00
Nobuhiro IMAI
f88401f38e [ruby/openssl] fix segv in Timestamp::{Request,Response,TokenInfo}.new
prevent `ossl_ts_*_free()` from calling when `d2i_TS_*_bio()` failed.

b29e215786
2021-10-16 18:34:35 +09:00
Nobuyoshi Nakada
ed7ea35d74 [ruby/openssl] Fixed misspellings
[ This is a backport to the 2.1 branch. ]

Fixed misspellings reported at [Bug #16437], for default gems.

(cherry picked from commit ruby/ruby@e68999c82c)

0f43789503
2021-10-16 18:25:11 +09:00
Kazuki Yamaguchi
6105ef7629 [ruby/openssl] ssl: add SSLContext#tmp_dh=
Provide a wrapper of SSL_set0_tmp_dh_pkey()/SSL_CTX_set_tmp_dh(), which
sets the DH parameters used for ephemeral DH key exchange.

SSLContext#tmp_dh_callback= already exists for this purpose, as a
wrapper around SSL_CTX_set_tmp_dh_callback(), but it is considered
obsolete and the OpenSSL API is deprecated for future removal. There is
no practical use case where an application needs to use different DH
parameters nowadays. This was originally introduced to support export
grade ciphers.

RDoc for #tmp_dh_callback= is updated to recommend the new #tmp_dh=.

Note that current versions of OpenSSL support automatic ECDHE curve
selection which is enabled by default. SSLContext#tmp_dh= should only be
necessary if you must allow ancient clients which don't support ECDHE.

aa43da4f04
2021-10-16 18:19:52 +09:00
Mike Dalessio
4ffc3fb019 [ruby/rdoc] fix: alias to method with call-seq
This change fixes alias call-seq to return nil if the method's
call-seq does not specify the alias.

Previously, the alias's call-seq would be an empty string in this case
which broke darkfish rendering.

This change also backfills test coverage for 0ead786 which moved
call-seq deduplication into AnyMethod.

5ce2789b6f
2021-10-16 06:31:11 +09:00
Mike Dalessio
4c42540da2 [ruby/rdoc] Support linking #==
See related commits:

- ebc66662 for #===
- 4943d208 for #[], #[]=, #<<, and #>>

8e47f7840a
2021-10-16 01:40:47 +09:00
Mike Dalessio
7aec65add4 [ruby/rdoc] feat: add support for :category: on C functions
45c92005fe
2021-10-16 01:39:36 +09:00
Mike Dalessio
fbd0516afc [ruby/rdoc] fix: comments in C files use the global markup option
Previously, Parser::C comments all defaulted to "rdoc" format, even
when the user had set a different default with the `--markup=<choice>`
option.

4643b08a26
2021-10-16 01:39:06 +09:00
Mike Dalessio
9225f3c1c6 [ruby/rdoc] test: add coverage for comment format in a C file
3b8334a796
2021-10-16 01:39:04 +09:00
Nobuyoshi Nakada
c19685e208
Reap rarely leaked threads 2021-10-14 22:57:45 +09:00
Nobuyoshi Nakada
a4f2aafd3a [rubygems/rubygems] Remove save_loaded_features
f5e408f83d
2021-10-14 05:03:36 +09:00
Nobuyoshi Nakada
3f0150f2fd [rubygems/rubygems] Keep loaded features
Now `$LOADED_FEATURES` list is being maintained by `setup` and
`teardown` and, only libaries under the temporary directory will
be removed.  As `save_loaded_features` removes the rest libraries
other than this test directory, ordinary libraries loaded from
files under rubygems also removed, and often causes constant
redefinition warnings.

9e1f92aafd
2021-10-14 05:03:36 +09:00
Nobuyoshi Nakada
9a3333986f Add more grpowned? tests 2021-10-14 00:20:13 +09:00
Kaíque Kandy Koga
5c646ca0a0 [ruby/irb] Ignore parenthesis during completion
Rename method

619aecb412
2021-10-13 06:33:48 +09:00
Nobuyoshi Nakada
41db84aa30 [ruby/reline] Skip when unable to set input
`Reline::Windows` always reads from the console by Windows API
 using fiddle.

c3bf85f5af
2021-10-13 02:24:01 +09:00
Nobuyoshi Nakada
97302a362b [ruby/reline] Close working pipes
ac519f57ea
2021-10-12 19:11:56 +09:00
Nobuyoshi Nakada
9f94a07e74 [ruby/reline] Fix test class not to overwrite
1e78984c49
2021-10-11 20:32:34 +09:00
aycabta
990e079b99 [ruby/reline] Reline doesn't have Reline.editing_mode
90c61d8188
2021-10-11 18:43:27 +09:00
aycabta
5895b4a7d9 [ruby/reline] Add I/O test
bca9b9012f
2021-10-11 18:43:27 +09:00
aycabta
5987bcaa2d [ruby/reline] Use single quotes to match the others
58a7ca4101
2021-10-11 18:43:26 +09:00
aycabta
b7ac9a2445 [ruby/reline] Add a test for Reline.delete_text
d1c5700fa3
2021-10-11 18:43:25 +09:00
aycabta
60d20e3537 [ruby/reline] Add assertions for Reline.point
a8c7b207f0
2021-10-11 18:43:25 +09:00
aycabta
706239fcc1 [ruby/reline] Add a test for Reline.insert_text and Reline.line_buffer
ae828208e1
2021-10-11 18:43:24 +09:00
aycabta
340fabca2c [ruby/irb] Set default return_format
7ee15bc668
2021-10-11 15:39:48 +09:00
Takashi Kokubun
82b87a8dc4 [ruby/irb] Clean up a duplicated definition
I simply forgot deleting it.

65399d5e9f
2021-10-11 15:25:05 +09:00
Takashi Kokubun
2e183c6273 [ruby/irb] trufflruby fails on the show_source test
460bd12b87
2021-10-10 23:23:48 -07:00