Age | Commit message (Collapse) | Author |
|
* Fix some UBSAN false positives.
* ruby tool/update-deps --fix
Notes:
Merged-By: jhawthorn <john@hawthorn.email>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6087
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6065
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6064
Merged-By: nobu <nobu@ruby-lang.org>
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5867
|
|
Do not override the input string encoding at the time of preparation,
the source encoding is not determined from the input yet.
Notes:
Merged: https://github.com/ruby/ruby/pull/6015
|
|
`no_blockarg` is called for non-null `node` only.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6016
|
|
Invalid escapes are handled at multiple levels. The first level
is in parse.y, so skip invalid unicode escape checks for regexps
in parse.y.
Make rb_reg_preprocess and unescape_nonascii accept the regexp
options. In unescape_nonascii, if the regexp is an extended
regexp, when "#" is encountered, ignore all characters until the
end of line or end of regexp.
Unfortunately, in extended regexps, you can use "#" as a non-comment
character inside a character class, so also parse "[" and "]"
specially for extended regexps, and only skip comments if "#" is
not inside a character class. Handle nested character classes as well.
This issue doesn't just affect extended regexps, it also affects
"(#?" comments inside all regexps. So for those comments, scan
until trailing ")" and ignore content inside.
I'm not sure if there are other corner cases not handled. A
better fix would be to redesign the regexp parser so that it
unescaped during parsing instead of before parsing, so you already
know the current parsing state.
Fixes [Bug #18294]
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Notes:
Merged: https://github.com/ruby/ruby/pull/5721
Merged-By: jeremyevans <code@jeremyevans.net>
|
|
|
|
|
|
Record block ID before vtable_pop, so the incorrect one doesn't
override it.
Fixes [Bug #18673]
Notes:
Merged: https://github.com/ruby/ruby/pull/5761
|
|
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5545
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5540
|
|
|
|
Get rid of depending on using $/ internally in String#chomp!, and
chomp the separator at once.
Notes:
Merged: https://github.com/ruby/ruby/pull/5403
|
|
Get rid of depending on using $/ internally in ARGF.gets.
Notes:
Merged: https://github.com/ruby/ruby/pull/5403
|
|
This allows for the following syntax:
```ruby
def foo(*)
bar(*)
end
def baz(**)
quux(**)
end
```
This is a natural addition after the introduction of anonymous
block forwarding. Anonymous rest and keyword rest arguments were
already supported in method parameters, this just allows them to
be used as arguments to other methods. The same advantages of
anonymous block forwarding apply to rest and keyword rest argument
forwarding.
This has some minor changes to #parameters output. Now, instead
of `[:rest], [:keyrest]`, you get `[:rest, :*], [:keyrest, :**]`.
These were already used for `...` forwarding, so I think it makes
it more consistent to include them in other cases. If we want to
use `[:rest], [:keyrest]` in both cases, that is also possible.
I don't think the previous behavior of `[:rest], [:keyrest]` in
the non-... case and `[:rest, :*], [:keyrest, :**]` in the ...
case makes sense, but if we did want that behavior, we'll have to
make more substantial changes, such as using a different ID in the
... forwarding case.
Implements [Feature #18351]
Notes:
Merged: https://github.com/ruby/ruby/pull/5148
|
|
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
|