| Age | Commit message (Collapse) | Author |
|
|
|
[Bug #19788] Use the result of `tCOLON2` event
---
parse.y | 16 ++++++++--------
test/ripper/test_parser_events.rb | 17 +++++++++++++++++
test/ripper/test_scanner_events.rb | 5 +++++
3 files changed, 30 insertions(+), 8 deletions(-)
|
|
[Backport #19025]"
This reverts commit e55dde3bdddbc595be12e7184a23e729647eb989.
|
|
[Bug #19025] Numbered parameter names are always local variables
---
parse.y | 2 +-
test/ruby/test_syntax.rb | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
|
|
Respect the encoding of the source [Bug #18827]
Do not override the input string encoding at the time of preparation,
the source encoding is not determined from the input yet.
---
parse.y | 26 ++++++++++++++++----------
test/ruby/test_ast.rb | 13 +++++++++++++
test/ruby/test_syntax.rb | 9 +++++++++
3 files changed, 38 insertions(+), 10 deletions(-)
|
|
Private local variables should shadow outer variables [Bug #18629]
---
parse.y | 3 ++-
test/ruby/test_parse.rb | 4 ++++
2 files changed, 6 insertions(+), 1 deletion(-)
|
|
Fix unexpected "duplicated key name" error in paren-less one line
pattern matching
[Bug #18990]
---
parse.y | 16 ++++++++++++----
test/ruby/test_pattern_matching.rb | 12 ++++++++++++
2 files changed, 24 insertions(+), 4 deletions(-)
|
|
Fix the wrong index of the previous component [Bug #18739]
---
parse.y | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Fix using anonymous block in method accepting explicit keywords
Record block ID before vtable_pop, so the incorrect one doesn't
override it.
Fixes [Bug #18673]
---
parse.y | 1 +
test/ruby/test_syntax.rb | 54 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 55 insertions(+)
|
|
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Co-authored-by: Marivaldo Cavalheiro <marivaldo@gmail.com>
Notes:
Merged: https://github.com/ruby/ruby/pull/5089
Merged-By: nobu <nobu@ruby-lang.org>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5269
|
|
This reverts commit b7f7117bdc78a4a342a57dad1a340b158492ccf3, to
separate `in_argdef` from `in_kwarg`.
Notes:
Merged: https://github.com/ruby/ruby/pull/5269
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5266
|
|
|
|
This `NODE` type was used in pre-YARV implementation, to improve
the performance of assignment to dynamic local variable defined at
the innermost scope. It has no longer any actual difference with
`NODE_DASGN`, except for the node dump.
Notes:
Merged: https://github.com/ruby/ruby/pull/5251
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5091
Merged-By: nobu <nobu@ruby-lang.org>
|
|
Dumped iseq binary can not have unnamed symbols/IDs, and ID 0 is
stored instead. As `struct rb_id_table` disallows ID 0, also for
the distinction, re-assign a new temporary ID based on the local
variable table index when loading from the binary, as well as the
parser.
Notes:
Merged: https://github.com/ruby/ruby/pull/5157
|
|
The implementation of a local variable tables was represented as `ID*`,
but it was very hacky: the first element is not an ID but the size of
the table, and, the last element is (sometimes) a link to the next local
table only when the id tables are a linked list.
This change converts the hacky implementation to a normal struct.
Notes:
Merged: https://github.com/ruby/ruby/pull/5136
|
|
block to another method without having to provide a name for the
block parameter.
Implements [Feature #11256]
Co-authored-by: Yusuke Endoh mame@ruby-lang.org
Co-authored-by: Nobuyoshi Nakada nobu@ruby-lang.org
Notes:
Merged: https://github.com/ruby/ruby/pull/5051
|
|
Local variable tables might leak at the parse error.
Notes:
Merged: https://github.com/ruby/ruby/pull/5111
|
|
This commit removes usages of rb_gc_force_recycle since it is a burden
to maintain and makes changes to the GC difficult.
Notes:
Merged: https://github.com/ruby/ruby/pull/4363
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5065
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5064
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5064
|
|
|
|
ast.c: Use kept script_lines data instead of re-open the source file
Notes:
Merged-By: mame <mame@ruby-lang.org>
|
|
`RubyVM.keep_script_lines` enables to keep script lines
for each ISeq and AST. This feature is for debugger/REPL
support.
```ruby
RubyVM.keep_script_lines = true
RubyVM::keep_script_lines = true
eval("def foo = nil\ndef bar = nil")
pp RubyVM::InstructionSequence.of(method(:foo)).script_lines
```
Notes:
Merged: https://github.com/ruby/ruby/pull/4913
|
|
Fixes [Bug #17719]
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Co-authored-by: Ivo Anjo <ivo@ivoanjo.me>
Notes:
Merged: https://github.com/ruby/ruby/pull/4969
Merged-By: jeremyevans <code@jeremyevans.net>
|
|
|
|
The former uses the current location, while the latter takes a
non-null location.
|
|
|
|
When Bison reports "memory exhausted", it means the parser stack
depth reached the limit `YYMAXDEPTH` which is defaulted to 10_000,
but not memory allocation failed.
|
|
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4836
|
|
|
|
`{x:, y:}` is a syntax sugar of `{x: x, y: y}`.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4791
|
|
[Feature #18051]
Notes:
Merged: https://github.com/ruby/ruby/pull/4763
|
|
... as per ko1's preference. He is preparing to extend this feature to
ISeq for his new debugger. He prefers "keep" to "save" for this wording.
This API is internal and not included in any released version, so I
change it in advance.
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4742
|
|
This fixes https://bugs.ruby-lang.org/issues/18038. The provided
reproduction showed that this happens in heredocs with double
interpolation. In this case `DSTR` was getting returned but needs to be
convered to a `EVSTR` which is what is returned by the function. There
may be an additional bug here that we weren't able to produce. It seems
odd that `STR` returns `DSTR` while everything else should return
`EVSTR` since the function is `new_evstr`.
[Bug #18038][ruby-core:104597]
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
Notes:
Merged: https://github.com/ruby/ruby/pull/4664
|
|
https://github.com/ruby/dev-meeting-log/blob/master/DevelopersMeeting20210715Japan.md#feature-17724-make-the-pin-operator-support-instanceclassglobal-variables-jeremyevans0
|
|
Pin matching for local variables and constants is already supported,
and it is fairly simple to add support for these variable types.
Note that pin matching for method calls is still not supported
without wrapping in parentheses (pin expressions). I think that's
for the best as method calls are far more complex (arguments/blocks).
Implements [Feature #17724]
Notes:
Merged: https://github.com/ruby/ruby/pull/4502
|
|
by merging `rb_ast_body_t#line_count` and `#script_lines`.
Fortunately `line_count == RARRAY_LEN(script_lines)` was always
satisfied. When script_lines is saved, it has an array of lines, and
when not saved, it has a Fixnum that represents the old line_count.
Notes:
Merged: https://github.com/ruby/ruby/pull/4581
|
|
This option makes the parser keep the original source as an array of
the original code lines. This feature exploits the mechanism of
`SCRIPT_LINES__` but records only the specified code that is passed to
RubyVM::AST.of or .parse, instead of recording all parsed program texts.
Notes:
Merged: https://github.com/ruby/ruby/pull/4581
|
|
* --braces-after-func-def-line
* --dont-cuddle-else
* --procnames-start-lines
* --space-after-for
* --space-after-if
* --space-after-while
|
|
```
p RubyVM::AbstractSyntaxTree.parse("::Foo += 1").children
#=> before: [[], nil, (OP_CDECL@1:0-1:10 (COLON3@1:0-1:10 :Foo) :+ (LIT@1:9-1:10 1))]
#=> after: [[], nil, (OP_CDECL@1:0-1:10 (COLON3@1:0-1:5 :Foo) :+ (LIT@1:9-1:10 1))]
```
|
|
Following non-special_const literals:
* T_REGEXP
Notes:
Merged: https://github.com/ruby/ruby/pull/4548
|