| Age | Commit message (Collapse) | Author |
|
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Notes:
Merged: https://github.com/ruby/ruby/pull/12787
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12787
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12819
|
|
It was defined in `arg` only; moved that pattern to `op_asgn` rule to
share it with `command_asgn`.
|
|
Otherwise, changes to the buffer by the destination write method
could result in data changing for supposedly independent strings.
Fixes [Bug #21131]
Notes:
Merged: https://github.com/ruby/ruby/pull/12771
|
|
|
|
We should skip reference updating for entries in too complex generic ivars
that are special constants. This fixes the following crash:
MAX_SHAPES = 0x80000
MAX_SHAPES.times do |i|
o = []
o.instance_variable_set(:"@foo#{i}", 1)
end
o = []
o.instance_variable_set(:"@a", 123)
GC.compact
Notes:
Merged: https://github.com/ruby/ruby/pull/12781
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12746
|
|
The instruction counter is slowing multi-Ractor applications. I had
changed it to use a thread local, but using a thread local is slowing
single threaded applications. This commit only enables the instruction
counter in YJIT stats builds until we can figure out a way to gather the
information with lower overhead.
Co-authored-by: Randy Stauner <randy.stauner@shopify.com>
Notes:
Merged: https://github.com/ruby/ruby/pull/12670
|
|
Previously, Ruby displayed backtraces for each thread on deadlock. However, it has not been shown since Ruby 3.0.
It should display the backtrace for debugging.
Co-authored-by: Jeremy Evans <code@jeremyevans.net>
Notes:
Merged-By: pocke <p.ck.t22@gmail.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12740
|
|
sometimes.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12706
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12690
|
|
Forwarding argument is optimized not to packed when no other arguments
and an internal object refers values before it. This size is decided
at called time, calculate the local variable index from the fixed end
point.
Notes:
Merged: https://github.com/ruby/ruby/pull/12686
|
|
|
|
`rb_print_undef` with `target_klass` as argument.
Notes:
Merged: https://github.com/ruby/ruby/pull/12665
|
|
Use `assert_raise_kind_of` instead of `assert_raise`, that rejects sub
classes of the given exceptions.
Notes:
Merged: https://github.com/ruby/ruby/pull/12626
|
|
The list of errors cited in 58bc97628c14933b73f13e0856d1a56e70e8b0e4
is not exhaustive and other errors may be raised by `getgrnam`.
Additionally, these errors are system dependent and may not be listed
on all platforms.
Notes:
Merged: https://github.com/ruby/ruby/pull/12610
|
|
Due to the x64 emulation of Windows 11 on ARM the environment variable PROCESSOR_ARCHITECTURE is set by the process startup code.
It must therefore be excluded from tests.
Otherwise tests fail like so:
```
[30585/32394] TestProcess#test_execopts_unsetenv_others = 0.10 s
16) Failure:
TestProcess#test_execopts_unsetenv_others [C:/Users/Lars/ruby/test/ruby/test_process.rb:446]:
<""> expected but was
<"PROCESSOR_ARCHITECTURE=ARM64\n">.
[30616/32394] TestProcess#test_execopts_env = 0.16 s
17) Failure:
TestProcess#test_execopts_env [C:/Users/Lars/ruby/test/ruby/test_process.rb:326]:
<"PATH\n"> expected but was
<"PATH\n" + "PROCESSOR_ARCHITECTURE\n">.
```
Notes:
Merged: https://github.com/ruby/ruby/pull/12581
|
|
Fixes [Bug #21031]
Notes:
Merged: https://github.com/ruby/ruby/pull/12575
|
|
[Bug #20955]
|
|
Have this for lead parameters as well as parameters after rest ("post").
[Bug #20974]
Notes:
Merged: https://github.com/ruby/ruby/pull/12547
|
|
When the end points of an inclusive range equal, `Range#step` should
yields the element once.
Notes:
Merged: https://github.com/ruby/ruby/pull/12559
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12539
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12538
|
|
The following Location information has been added This is the information required for parse.y to be a universal parser:
```
❯ ruby --parser=prism --dump=parsetree -e "for a in b do end"
@ ProgramNode (location: (1,0)-(1,17))
+-- locals: [:a]
+-- statements:
@ StatementsNode (location: (1,0)-(1,17))
+-- body: (length: 1)
+-- @ ForNode (location: (1,0)-(1,17))
+-- index:
| @ LocalVariableTargetNode (location: (1,4)-(1,5))
| +-- name: :a
| +-- depth: 0
+-- collection:
| @ CallNode (location: (1,9)-(1,10))
| +-- CallNodeFlags: variable_call, ignore_visibility
| +-- receiver: nil
| +-- call_operator_loc: nil
| +-- name: :b
| +-- message_loc: (1,9)-(1,10) = "b"
| +-- opening_loc: nil
| +-- arguments: nil
| +-- closing_loc: nil
| +-- block: nil
+-- statements: nil
+-- for_keyword_loc: (1,0)-(1,3) = "for"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- in_keyword_loc: (1,6)-(1,8) = "in"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- do_keyword_loc: (1,11)-(1,13) = "do"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- end_keyword_loc: (1,14)-(1,17) = "end"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
|
|
Previously, since the opt_aset_with optimization was introduced,
use of the opt_aset_with optimization inside multiple assignment
would result in a segfault or incorrect instructions.
Fixes [Bug #21012]
Co-authored-by: Nobuyoshi Nakada <nobu.nakada@gmail.com>
Notes:
Merged: https://github.com/ruby/ruby/pull/12528
Merged-By: jeremyevans <code@jeremyevans.net>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12531
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12530
|
|
The iseq location object has a slot for node ids. parse.y was correctly
populating that field but Prism was not. This commit populates the field
with the ast node id for that iseq
[Bug #21014]
Notes:
Merged: https://github.com/ruby/ruby/pull/12527
|
|
After switching to `Float`-mode when summing `Numeric` objects,
normalization for `Float` is still needed.
Notes:
Merged: https://github.com/ruby/ruby/pull/12522
|
|
(#12518)
[Bug #21006] Fix defined_expr compilation of method call with parenthesized receiver
|
|
Fixes [Bug #21001]
Notes:
Merged: https://github.com/ruby/ruby/pull/12513
|
|
Fixes [Bug #21003]
Notes:
Merged: https://github.com/ruby/ruby/pull/12512
|
|
There are warnings emitted from test_flip2_locations and test_flip3_locations.
This commit changes ast_parse to suppress all warnings.
warning: integer literal in flip-flop
warning: string literal in flip-flop
Notes:
Merged: https://github.com/ruby/ruby/pull/12509
|
|
Previously, the code for dropping surplus arguments when yielding
into blocks erroneously attempted to drop keyword arguments when there
is in fact no surplus arguments. Fix the condition and test that
supplying the exact number of keyword arguments as require compiles
without fallback.
Notes:
Merged: https://github.com/ruby/ruby/pull/12499
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11986
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11986
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11986
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11986
|
|
The following Location information has been added This is the information required for parse.y to be a universal parser:
```
❯ ruby --parser=prism --dump=parsetree -e '/foo/'
@ ProgramNode (location: (1,0)-(1,5))
+-- locals: []
+-- statements:
@ StatementsNode (location: (1,0)-(1,5))
+-- body: (length: 1)
+-- @ RegularExpressionNode (location: (1,0)-(1,5))
+-- RegularExpressionFlags: forced_us_ascii_encoding
+-- opening_loc: (1,0)-(1,1) = "/"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- content_loc: (1,1)-(1,4) = "foo"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- closing_loc: (1,4)-(1,5) = "/"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- unescaped: "foo"
```
|
|
The following Location information has been added This is the information required for parse.y to be a universal parser:
```
❯ ruby --parser=prism --dump=parsetree -e "-> (a, b) do foo end"
@ ProgramNode (location: (1,0)-(1,20))
+-- locals: []
+-- statements:
@ StatementsNode (location: (1,0)-(1,20))
+-- body: (length: 1)
+-- @ LambdaNode (location: (1,0)-(1,20))
+-- locals: [:a, :b]
+-- operator_loc: (1,0)-(1,2) = "->"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- opening_loc: (1,10)-(1,12) = "do"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- closing_loc: (1,17)-(1,20) = "end"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
: (snip)
```
|
|
The following Location information has been added This is the information required for parse.y to be a universal parser:
```
❯ ruby --parser=prism --dump=parsetree -e 'def foo; yield end'
@ ProgramNode (location: (1,0)-(1,18))
+-- locals: []
+-- statements:
@ StatementsNode (location: (1,0)-(1,18))
+-- body: (length: 1)
+-- @ DefNode (location: (1,0)-(1,18))
+-- name: :foo
+-- name_loc: (1,4)-(1,7) = "foo"
+-- receiver: nil
+-- parameters: nil
+-- body:
| @ StatementsNode (location: (1,9)-(1,14))
| +-- body: (length: 1)
| +-- @ YieldNode (location: (1,9)-(1,14))
| +-- keyword_loc: (1,9)-(1,14) = "yield"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| +-- lparen_loc: nil
^^^^^^^^^^^^^^^^^^^
| +-- arguments: nil
| +-- rparen_loc: nil
^^^^^^^^^^^^^^^^^^^
+-- locals: []
+-- def_keyword_loc: (1,0)-(1,3) = "def"
+-- operator_loc: nil
+-- lparen_loc: nil
+-- rparen_loc: nil
+-- equal_loc: nil
+-- end_keyword_loc: (1,15)-(1,18) = "end"
```
|
|
The following Location information has been added This is the information required for parse.y to be a universal parser:
```
❯ ruby --parser=prism --dump=parsetree -e '"#{foo}"'
@ ProgramNode (location: (1,0)-(1,8))
+-- locals: []
+-- statements:
@ StatementsNode (location: (1,0)-(1,8))
+-- body: (length: 1)
+-- @ InterpolatedStringNode (location: (1,0)-(1,8))
+-- InterpolatedStringNodeFlags: nil
+-- opening_loc: (1,0)-(1,1) = "\""
+-- parts: (length: 1)
| +-- @ EmbeddedStatementsNode (location: (1,1)-(1,7))
| +-- opening_loc: (1,1)-(1,3) = "\#{"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| +-- statements:
| | @ StatementsNode (location: (1,3)-(1,6))
| | +-- body: (length: 1)
| | +-- @ CallNode (location: (1,3)-(1,6))
| | +-- CallNodeFlags: variable_call, ignore_visibility
| | +-- receiver: nil
| | +-- call_operator_loc: nil
| | +-- name: :foo
| | +-- message_loc: (1,3)-(1,6) = "foo"
| | +-- opening_loc: nil
| | +-- arguments: nil
| | +-- closing_loc: nil
| | +-- block: nil
| +-- closing_loc: (1,6)-(1,7) = "}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- closing_loc: (1,7)-(1,8) = "\""
```
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11712
|
|
- Change generate_case_mapping_tests to
generate_single_byte_case_mapping_tests
(all encodings using this method happen to be single-byte)
- Change precalculation of codepoints by converting from
specific encoding, not from Unicode. This reduces creation time.
(See https://github.com/ruby/ruby/pull/7425 for a related proposal
and some additional comments.)
|
|
The following Location information has been added This is the information required for parse.y to be a universal parser:
```
❯ ruby --parser=prism --dump=parsetree -y -e "if a; elsif b; else end"
@ ProgramNode (location: (1,0)-(1,23))
+-- locals: []
+-- statements:
@ StatementsNode (location: (1,0)-(1,23))
+-- body: (length: 1)
+-- @ IfNode (location: (1,0)-(1,23))
+-- if_keyword_loc: (1,0)-(1,2) = "if"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- predicate:
| @ CallNode (location: (1,3)-(1,4))
| +-- CallNodeFlags: variable_call, ignore_visibility
| +-- receiver: nil
| +-- call_operator_loc: nil
| +-- name: :a
| +-- message_loc: (1,3)-(1,4) = "a"
| +-- opening_loc: nil
| +-- arguments: nil
| +-- closing_loc: nil
| +-- block: nil
+-- then_keyword_loc: nil
^^^^^^^^^^^^^^^^^^^^^^^^^
+-- statements: nil
+-- subsequent:
| @ IfNode (location: (1,6)-(1,23))
| +-- if_keyword_loc: (1,6)-(1,11) = "elsif"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| +-- predicate:
| | @ CallNode (location: (1,12)-(1,13))
| | +-- CallNodeFlags: variable_call, ignore_visibility
| | +-- receiver: nil
| | +-- call_operator_loc: nil
| | +-- name: :b
| | +-- message_loc: (1,12)-(1,13) = "b"
| | +-- opening_loc: nil
| | +-- arguments: nil
| | +-- closing_loc: nil
| | +-- block: nil
| +-- then_keyword_loc: nil
^^^^^^^^^^^^^^^^^^^^^^^^^
| +-- statements: nil
| +-- subsequent:
| | @ ElseNode (location: (1,15)-(1,23))
| | +-- else_keyword_loc: (1,15)-(1,19) = "else"
| | +-- statements: nil
| | +-- end_keyword_loc: (1,20)-(1,23) = "end"
| +-- end_keyword_loc: (1,20)-(1,23) = "end"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- end_keyword_loc: (1,20)-(1,23) = "end"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12483
|