TechTips
Home
About
Log in
Sign up
Home
Software
Programming languages
Ruby
Filters
Bookmarked comments
Your comments
RubyのArrayやHashのリテラルをdeep freezeするshareable_constant_valueマジックコメント
@wakairo
04 Dec, 2024 02:44 +00:00
## 概要 Rubyでは、以下のように`shareable_constant_value: literal`というマジックコメントを記入することで、 以下の例のように、定数に代入したArrayやHashのリテラルを深く(deeply)fre…