Include the first constant name into `Ractor::IsolationError` message
commitbf72cb84ca52bc062cc1711c03622ed6c928fed8
authoryui-knk <[email protected]>
Fri, 5 Jan 2024 10:45:19 +0000 (5 19:45 +0900)
committerYuichiro Kaneko <[email protected]>
Sat, 10 Feb 2024 00:23:17 +0000 (10 09:23 +0900)
treea5e17e57e10fe9db150d04c7fd1946ab0a2529b0
parente7b0a01002323d9ed8eed9abca2a4979ebe9ae32
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)
```
ruby_parser.c
test/ruby/test_parse.rb