Commit a2b8e91
Add highlighting for shareable_constant_value
Ruby 3.0.0 added a new magic comment for making different literals
"shareable" (a.k.a frozen).
Here is a link to the docs: https://github.com/ruby/ruby/blob/cfbf2bde4002821d12047b2aba0010739aaf925e/doc/syntax/comments.rdoc#label-shareable_constant_value+Directive
Here's a demo of the feature:
```
$ cat test.rb
# shareable_constant_value: literal
FOO = [ 1, 2, 3 ]
p FOO.frozen?
$ ruby test.rb
true
```1 parent 10dfcbe commit a2b8e91
2 files changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
43 | 49 | | |
44 | 50 | | |
45 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
432 | | - | |
| 432 | + | |
433 | 433 | | |
434 | 434 | | |
| 435 | + | |
435 | 436 | | |
436 | 437 | | |
437 | 438 | | |
| |||
0 commit comments