diff options
author | yui-knk <[email protected]> | 2024-01-05 19:45:19 +0900 |
---|---|---|
committer | Yuichiro Kaneko <[email protected]> | 2024-02-10 09:23:17 +0900 |
commit | bf72cb84ca52bc062cc1711c03622ed6c928fed8 (patch) | |
tree | a5e17e57e10fe9db150d04c7fd1946ab0a2529b0 /ruby_parser.c | |
parent | e7b0a01002323d9ed8eed9abca2a4979ebe9ae32 (diff) |
Include the first constant name into `Ractor::IsolationError` message
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)
```
Diffstat (limited to 'ruby_parser.c')
-rw-r--r-- | ruby_parser.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ruby_parser.c b/ruby_parser.c index 04a49da0ec..c48f563744 100644 --- a/ruby_parser.c +++ b/ruby_parser.c @@ -1060,6 +1060,7 @@ rb_node_const_decl_val(const NODE *node) } else if (n && nd_type_p(n, NODE_COLON3)) { // ::Const::Name + rb_ary_push(path, rb_id2str(RNODE_COLON3(n)->nd_mid)); rb_ary_push(path, rb_str_new(0, 0)); } else { |