Граф коммитов

85699 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 56d2c26c85
ripper: Move `assign_error` call to `assignable`
Prepare `lhs` as `$:$` before `assignable` and update it there.
Remove `ripper_assignable` which is no longer used.
2024-05-21 13:52:30 +09:00
Nobuyoshi Nakada e61e5c3b84
ripper: Move `assign_error` call to `const_decl`
Prepare `path` as `$:$` before `const_decl` and update it there.
Remove `ripper_const_decl` which is no longer used.
2024-05-21 13:52:29 +09:00
Nobuyoshi Nakada 66446b9435
ripper: Allow parenthesized comma in options 2024-05-21 13:52:29 +09:00
Nobuyoshi Nakada 47efdae602
ripper: Preserve indentation 2024-05-21 13:52:29 +09:00
Nobuyoshi Nakada 147134b474
ripper: Remove rb_ripper_none
Now it is used only for wheter `opt_paren_args` is `none`.  Introduce
a new special node to distinguish an empty parentheses from it .
2024-05-21 13:52:29 +09:00
Nobuyoshi Nakada ee8bbbabe5
ripper: Show popped TOS in debug mode 2024-05-21 13:52:29 +09:00
Nobuyoshi Nakada 2e765c20db
ripper: Short hand for `rb_ary_new_from_args` 2024-05-21 13:52:29 +09:00
Nobuyoshi Nakada 2d92a4afba
ripper: Make `$:n` to refer each grammar values
Ripper DSL uses these values for callbacks, but does not need indexes.
2024-05-21 13:52:29 +09:00
Nobuyoshi Nakada 5fed63f7b0
ripper: Use ripper DSL in simple dispatch chain cases 2024-05-21 13:52:29 +09:00
dependabot[bot] 30aa300f84 ---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-20 19:49:21 -07:00
Kevin Newton 6ddc0a8044 [PRISM] Enable TestRegexp#test_unescape 2024-05-20 21:25:51 -04:00
Kevin Newton e82c7a0577 [PRISM] Enable TestRegexp#test_match_control_meta_escape 2024-05-20 21:25:51 -04:00
Jeremy Evans 86cf074fa1 Avoid array allocation for empty ruby2_keywords flagged keyword hash
If the method being called does not have a positional splat
parameter, there is no point in allocating the array, as
decrementing given_argc is sufficient to ensure the empty keyword
hash is not considered an argument, assuming that we are calling
a method/lambda and not a regular proc.
2024-05-21 05:33:57 +09:00
Jeremy Evans 2433b57b6a Avoid hash allocation for empty ruby2_keywords flagged keyword hash
If the method being called does not have a keyword splat parameter,
there is no point in allocating the hash, because the hash will
be unused (as empty keyword hashes are ignored).
2024-05-21 05:33:57 +09:00
Jeremy Evans f021bcdbbe Add allocation tests for ruby2_keywords
This tests ruby2_keywords flagged methods, as well as passing
ruby2_keywords flagged hashes to other methods.

Some of the behavior here is questionable, such as allocating
different numbers of objects depending on whether a block is
passed or whether YJIT is enabled. I think there are likely ways
to eliminate allocations in certain cases.  However, this gives
us a baseline and shows us where it is possible to make
improvements.
2024-05-21 05:33:57 +09:00
Kevin Newton 7c2c528d35 [ruby/prism] Fix up regexp escapes with control/meta
https://github.com/ruby/prism/commit/8a7afa6988
2024-05-20 19:39:21 +00:00
Kevin Newton 012b764f7c [ruby/prism] Fix up regexp escapes with control/meta and x
https://github.com/ruby/prism/commit/1dbbbedf55
2024-05-20 19:39:21 +00:00
Kevin Newton 6c07aa364d [PRISM] Remove old prism spec workflow, just use default.mspec now 2024-05-20 12:28:47 -04:00
Kevin Newton a708b6aa65 [PRISM] Respect eval coverage setting 2024-05-20 12:28:47 -04:00
Kevin Newton 78e504f21d [PRISM] Enable TestPrism#test_truncated_source_line 2024-05-20 12:28:37 -04:00
Kevin Newton ca5b458044 [PRISM] Match CRuby line semantics for evstr 2024-05-20 11:28:53 -04:00
Yusuke Endoh 1ba93c2c4d Upload cores to AWS S3 (if any) 2024-05-21 00:04:41 +09:00
Yusuke Endoh f1bbcc8126 Make sure that kern.coredump=1 2024-05-21 00:04:41 +09:00
Kevin Newton 785fba3b16 [PRISM] Enable TestSyntax#test_warn_balanced 2024-05-20 10:49:41 -04:00
Kevin Newton 2e8ae13974 [ruby/prism] Fix invalid read at EOF
https://github.com/ruby/prism/commit/dddaf67c34
2024-05-20 14:42:58 +00:00
Kevin Newton e90e8f8bd3 [ruby/prism] Implement ambiguous binary operator warning
https://github.com/ruby/prism/commit/6258c3695f
2024-05-20 14:01:05 +00:00
git 8248268434 Update bundled gems list at 7f0e26b7f9 [ci skip] 2024-05-20 09:10:55 +00:00
Hiroshi SHIBATA 7f0e26b7f9 Re-use strscan with ruby repo 2024-05-20 18:10:09 +09:00
Hiroshi SHIBATA 70ad58cb62 Update bundled_gems 2024-05-20 18:10:09 +09:00
Jean Boussier 0b38403328 Fix incorrect assertion in TestThreadInstrumentation
The test meant to assert the thread is suspended at least once,
but was actually asserting to it to be suspected at least twice.
2024-05-20 14:59:59 +09:00
Nobuyoshi Nakada fa26ef5bf7 Fix the end of "compiler section" 2024-05-20 13:54:08 +09:00
Nobuyoshi Nakada 14da90f262 --with-gmp-dir option is for ruby itself, not extensions 2024-05-20 13:54:08 +09:00
Nobuyoshi Nakada 18eaf0be90 [Bug #20494] Search non-default directories for GMP
Co-Authored-by: lish82 (Hiroki Katagiri)
2024-05-20 13:54:08 +09:00
Yusuke Endoh eb410c9fde [ruby/error_highlight] Load "did_you_mean" explicitly in test
I'm not sure how it works, but I seem to get an error
`undefined method 'formatter' for module DidYouMean` in parallel mode of
`make test-all`.

https://app.launchableinc.com/organizations/ruby/workspaces/ruby/data/test-paths/file%3Dtest%2Ferror_highlight%2Ftest_error_highlight.rb%23class%3DErrorHighlightTest%23testcase%3Dtest_explicit_raise_name_error?organizationId=ruby&workspaceId=ruby&testPathId=file%3Dtest%2Ferror_highlight%2Ftest_error_highlight.rb%23class%3DErrorHighlightTest%23testcase%3Dtest_explicit_raise_name_error&testSessionStatus=flake

https://github.com/ruby/error_highlight/commit/f931b42430
2024-05-20 03:47:22 +00:00
Nobuyoshi Nakada a10a483af9 [rubygems/rubygems] Should rescue vendored net-http exception
https://github.com/rubygems/rubygems/commit/7d2c4cf364
2024-05-20 01:35:58 +00:00
Nobuyoshi Nakada d037c5196a
Suppress -Wclobbered warnings
At 7afc16aa48, now `BLOCKING_REGION`
contains `setjmp` call in `RB_VM_SAVE_MACHINE_CONTEXT`.  By this
change, variables in blocks for this macro may be clobbered.
2024-05-20 01:30:49 +09:00
TOMITA Masahiro 48ebd77e59 Fix comment: Buffer.for(string) without block returns readonly buffer 2024-05-19 23:24:50 +09:00
TOMITA Masahiro cb43540d53 Fix IO::Buffer comment 2024-05-19 23:24:50 +09:00
Nobuyoshi Nakada 8c0b57d3ee
`rb_enc_compile_warn` and `rb_enc_compile_warning` are printf format 2024-05-19 22:15:59 +09:00
Nobuyoshi Nakada b47533f67b
Remove `rb_bug` after COMPILE_ERROR
Fix test failures since 7afc16aa48.
Why crash after reported compile error properly.
2024-05-19 20:45:47 +09:00
KJ Tsanaktsidis 7afc16aa48 Inline RB_VM_SAVE_MACHINE_CONTEXT into BLOCKING_REGION
There's an exhaustive explanation of this in the linked redmine bug, but
the short version is as follows:

blocking_region_begin can spill callee-saved registers to the stack for
its own use. That means they're not saved to ec->machine by the call to
setjmp, since by that point they're already on the stack and new,
different values are in the real registers. ec->machine's end-of-stack
pointer is also bumped to accomodate this, BUT, after
blocking_region_begin returns, that points past the end of the stack!

As far as C is concerned, that's fine; the callee-saved registers are
restored when blocking_region_begin returns. But, if another thread
triggers GC, it is relying on finding references to Ruby objects by
walking the stack region pointed to by ec->machine.

If the C code in exec; subsequently does things that use that stack
memory, then the value will be overwritten and the GC might prematurely
collect something it shouldn't.

[Bug #20493]
2024-05-19 12:08:35 +09:00
Andrew Konchin ad636033e2 Update to ruby/spec@6b04c1d 2024-05-19 12:08:05 +09:00
Nobuyoshi Nakada dbbaf871de
[DOC] Fix `$<` comment 2024-05-19 00:29:00 +09:00
Nobuyoshi Nakada fd8e6e8c54
Replace cast tags for `tSTRING_DVAR` with typed midrule actions 2024-05-19 00:27:34 +09:00
Nobuyoshi Nakada 232f7b37cf
Replace cast tags with typed midrule actions
* Add types to `tLAMBDA` and `tSTRING_DBEG` to store corresponding
  information when returning these tokens.
* Add `enum lex_state_e state` to `%union` for `tSTRING_DBEG`.
2024-05-18 19:46:05 +09:00
BurdetteLamar ac85eef18b Fix links 2024-05-18 15:44:24 +09:00
yui-knk 55c62e676f No need to specify tags anymore
In the past, these codes were used by both parser and ripper.
On ripper, the type of LHS is `<val>` then type cast was needed.
However currently these are only used by parser then no need to
cast.
2024-05-18 11:26:17 +09:00
Kevin Newton cce7c25a42 [PRISM] Enable TestRequire 2024-05-17 16:42:14 -04:00
Kevin Newton e61d24d77e [PRISM] Enable passing IRB test 2024-05-17 11:29:00 -04:00
Kevin Newton c60cdbdc98 [PRISM] Emit END event for modules 2024-05-17 11:23:23 -04:00