| Age | Commit message (Collapse) | Author |
|
|
|
This commit allows codes like `a b do end.()` and `a b do end&.()`.
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12925
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12946
|
|
It was defined in `arg` only; moved that pattern to `op_asgn` rule to
share it with `command_asgn`.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12530
|
|
Fixes [Bug #20916]
Notes:
Merged: https://github.com/ruby/ruby/pull/12417
|
|
Compilation of NODE_HASH in compile_shareable_literal_constant does not support hash that contains keyword splat.
If there is a keyword splat, fallback to default case.
Notes:
Merged: https://github.com/ruby/ruby/pull/12338
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11451
|
|
The bug didn't impact master because this was largely refactored,
but it's still valuable to add the test for it to prevent future
regressions.
Notes:
Merged: https://github.com/ruby/ruby/pull/11359
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11276
|
|
Blocks and keywords are allowed in regular index.
Also update NEWS to make this more clear.
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Bug #20339]
[Bug #20341]
`const_decl_path` changes the value of `NODE **dest`, LHS of an assignment,
with `NODE_LIT` created by `const_decl_path`. `shareable_literal_constant` calls
`const_decl_path` via `ensure_shareable_node` multiple times if RHS of an assignment
is array or hash. This means `NODE **dest` argument of `const_decl_path` can be `NODE_LIT`
from the second time then causes `[BUG] unexpected node: NODE_LIT` in
`rb_node_const_decl_val`.
This commit change to not update `NODE **dest` in `const_decl_path` to
fix the issue.
|
|
|
|
|
|
In a method definition, the `begin` may not have an `nd_body`. When that
happens we get a null expr back from `last_expr_node` which causes a
segv for the following examples:
```ruby
def (begin;end).foo; end
def (begin;else;end).foo; end
def (begin;ensure;else;end).foo; end
```
In addition, I've added tests for other cases that weren't causing a
segv but appeared untested.`
Fixes https://bugs.ruby-lang.org/issues/20234
|
|
[Feature #16495]
|
|
|
|
`dest` of `const_decl_path` is `NODE_COLON2` or `NODE_COLON3` in some cases.
For example, `B::C ||= [“Not ” + “shareable”]` passes `NODE_COLON2`
and `::C ||= [“Not ” + “shareable”]` passes `NODE_COLON3`.
This commit fixes `Ractor::IsolationError` message for such case.
```
# shareable_constant_value: literal
::C ||= ["Not " + "shareable"]
# Before
# => cannot assign unshareable object to C (Ractor::IsolationError)
# After
# => cannot assign unshareable object to ::C (Ractor::IsolationError)
```
|
|
If lhs of assignment is top-level constant reference, the first
constant name is omitted from error message.
This commit fixes it.
```
# shareable_constant_value: literal
::C = ["Not " + "shareable"]
# Before
# => cannot assign unshareable object to (Ractor::IsolationError)
# After
# => cannot assign unshareable object to ::C (Ractor::IsolationError)
```
|
|
|
|
|
|
|
|
The encodings determined at runtime are affected by the runtime
environment, such as the OS and locale, while the file contents are
not.
|
|
|
|
|
|
|
|
|
|
|
|
For static analysis, it’s better to keep unused literal nodes.
If simply change `block_append` to fall through, both "unused literal ignored"
and "possibly useless use of a literal in void context" warnings
are shown for the same line. But it’s verbose then remove
"unused literal ignored" warning.
This kind of optimization is already implemented on compile.c.
`compile_block` calls `iseq_compile_each0` with `popped = 1` when NODE_BLOCK
has next.
|
|
condition
|
|
Use `peekc` or `nextc` to fetch the next character, instead of reading
from `lex.pcur` directly, for compilers that plain char is signed.
|
|
```
[24688/26146] TestParse#test_named_capture_in_block(eval at /home/chkbuild/chkbuild/tmp/build/20230926T063004Z/ruby/test/ruby/test_parse.rb:999):1: warning: unused literal ignored
(eval at /home/chkbuild/chkbuild/tmp/build/20230926T063004Z/ruby/test/ruby/test_parse.rb:999):1: warning: unused literal ignored
(eval at /home/chkbuild/chkbuild/tmp/build/20230926T063004Z/ruby/test/ruby/test_parse.rb:999):1: warning: unused literal ignored
(eval at /home/chkbuild/chkbuild/tmp/build/20230926T063004Z/ruby/test/ruby/test_parse.rb:999):1: warning: unused literal ignored
(eval at /home/chkbuild/chkbuild/tmp/build/20230926T063004Z/ruby/test/ruby/test_parse.rb:999):1: warning: unused literal ignored
(eval at /home/chkbuild/chkbuild/tmp/build/20230926T063004Z/ruby/test/ruby/test_parse.rb:999):1: warning: possibly useless use of + in void context
= 0.00 s
```
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/8440
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/8440
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/8440
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7615
|