1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
`shareable_constant_value` is magic comment.
This commit is contained in:
Koichi Sasada 2021-09-10 13:51:50 +09:00 committed by GitHub
parent 5dc753df47
commit 3d4207f9bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -674,7 +674,7 @@ TABLE = Ractor.make_shareable( {a: 'ko1', b: 'ko2', c: 'ko3'} )
To make it easy, Ruby 3.0 introduced new `shareable_constant_value` Directive.
```ruby
shareable_constant_value: literal
# shareable_constant_value: literal
TABLE = {a: 'ko1', b: 'ko2', c: 'ko3'}
#=> Same as: TABLE = Ractor.make_shareable( {a: 'ko1', b: 'ko2', c: 'ko3'} )