Age | Commit message (Collapse) | Author |
|
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
|
|
Following non-special_const literals:
* T_BIGNUM
* T_FLOAT (non-flonum)
* T_RATIONAL
* T_COMPLEX
Notes:
Merged: https://github.com/ruby/ruby/pull/4548
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4516
|
|
As well as `\u`, `\U` should be invalid there too.
And highlight including `u`/`U` not only the backslash before it.
|
|
Ruby uses a recursive algorithm for handling control/meta escapes
in strings (read_escape). However, the equivalent code for regexps
(tokadd_escape) in did not use a recursive algorithm. Due to this,
Handling of control/meta escapes in regexp did not have the same
behavior as in strings, leading to behavior such as the following
returning nil:
```ruby
/\c\xFF/ =~ "\c\xFF"
```
Switch the code for handling \c, \C and \M in literal regexps to
use the same code as for strings (read_escape), to keep behavior
consistent between the two.
Fixes [Bug #14367]
Notes:
Merged: https://github.com/ruby/ruby/pull/4495
|
|
This change allows `def hello = puts "Hello"` without parentheses.
Note that `private def hello = puts "Hello"` does not parse for
technical reason.
[Feature #17398]
|
|
by firing the write barrier of imemo_ast after nd_lit is modified.
This will fix the issue of https://github.com/ruby/ruby/pull/4416 more
gracefully.
Notes:
Merged: https://github.com/ruby/ruby/pull/4419
|
|
|
|
This commit is based on the patch by @nobu.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4180
|
|
Although it was used just to suppress an "unsed argument" warning
in the same manner as other bison-provided functions, it has been
dropped since Bision 3.7.5. And we always suppress that
warnings.
Notes:
Merged: https://github.com/ruby/ruby/pull/4121
|
|
As NODE_ZLIST/NODE_LIST are not markable, cannot be reused as
NODE_LIT.
Notes:
Merged: https://github.com/ruby/ruby/pull/4069
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4069
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4059
|
|
refs: 733ed1e184
|
|
|
|
Problem
===
Arguments information is missing for endless method without parens.
For example:
```ruby
# ok
pp RubyVM::AbstractSyntaxTree.parse(<<~RUBY).children[2]
def x() = 42
RUBY
# => (DEFN@1:0-1:12
# mid: :x
# body:
# (SCOPE@1:0-1:12
# tbl: []
# args:
# (ARGS@1:5-1:6
# pre_num: 0
# pre_init: nil
# opt: nil
# first_post: nil
# post_num: 0
# post_init: nil
# rest: nil
# kw: nil
# kwrest: nil
# block: nil)
# body: (LIT@1:10-1:12 42)))
# ok
pp RubyVM::AbstractSyntaxTree.parse(<<~RUBY).children[2]
def x() 42 end
RUBY
# => (DEFN@1:0-1:14
# mid: :x
# body:
# (SCOPE@1:0-1:14
# tbl: []
# args:
# (ARGS@1:5-1:6
# pre_num: 0
# pre_init: nil
# opt: nil
# first_post: nil
# post_num: 0
# post_init: nil
# rest: nil
# kw: nil
# kwrest: nil
# block: nil)
# body: (LIT@1:8-1:10 42)))
# It has a problem, the `args` is nil
pp RubyVM::AbstractSyntaxTree.parse(<<~RUBY).children[2]
def x = 42
RUBY
# => (DEFN@1:0-1:10
# mid: :x
# body: (SCOPE@1:0-1:10 tbl: [] args: nil body: (LIT@1:8-1:10 42)))
```
It causes an error if a program expects `args` node exists.
For example: https://github.com/ruby/rbs/issues/551
Solution
====
Call `new_args` on this case.
Notes:
Merged: https://github.com/ruby/ruby/pull/4016
Merged-By: nobu <[email protected]>
|
|
"experimental_everything" makes the assigned value, it means
the assignment change the state of assigned value.
"experimental_copy" tries to make a deep copy and make copyied object
sharable.
Notes:
Merged: https://github.com/ruby/ruby/pull/3989
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3950
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3950
|
|
When `literal`, check if the literal about to be assigned to a
constant is ractor-shareable, otherwise raise `Ractor::Error` at
runtime instead of `SyntaxError`.
Notes:
Merged: https://github.com/ruby/ruby/pull/3950
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3977
|
|
NEW_GASGN and NEW_GVAR evaluate `id` argument twice.
|
|
features
This adds rb_category_compile_warn in order to emit compiler warnings
with categories. Note that Ripper currently ignores the category
for these warnings, but by default it ignores the warnings completely,
so this shouldn't matter.
Notes:
Merged: https://github.com/ruby/ruby/pull/3917
|
|
Non-literal expression which is not a part of a literal expression
is not a subject of `shareable_literal_value: literal`.
|
|
|
|
[Bug #17345]
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3909
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3681
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3681
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3681
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3681
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3681
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3681
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3681
|
|
It does shallow freeze only for now.
Notes:
Merged: https://github.com/ruby/ruby/pull/3681
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3681
|
|
|
|
variable pattern
https://github.com/ruby/dev-meeting-log/blob/master/DevelopersMeeting20201210Japan.md#feature-17371-reintroduce-expr-in-pat-ktsj
|
|
To make some kind of Ractor related extensions, some functions
should be exposed.
* include/ruby/thread_native.h
* rb_native_mutex_*
* rb_native_cond_*
* include/ruby/ractor.h
* RB_OBJ_SHAREABLE_P(obj)
* rb_ractor_shareable_p(obj)
* rb_ractor_std*()
* rb_cRactor
and rm ractor_pub.h
and rename srcdir/ractor.h to srcdir/ractor_core.h
(to avoid conflict with include/ruby/ractor.h)
Notes:
Merged: https://github.com/ruby/ruby/pull/3775
|
|
Fixes [Bug #17124]
Notes:
Merged: https://github.com/ruby/ruby/pull/3767
|
|
|