Re:Types will be part of Ruby 3 stdlib source
by mnarayan01 on Friday April 19, 2019 @08:27AM
(#19698981)
Then you'd need an extra set of delimiters, e.g.:
[ Parent
| on HN ]
Re:Types will be part of Ruby 3 stdlib source
by BenMorganIO on Friday April 19, 2019 @02:01PM
(#19701578)
But that would make the hash braces redundant so you could just use parenthesis.
Re:Types will be part of Ruby 3 stdlib source
by mnarayan01 on Saturday April 20, 2019 @12:54AM
(#19704878)
That's a block returning a Hash; see bhuga's sibling comment where he notes that they're using blocks to lazy load the constants in the type definition, which may seem silly for e.g. Integer, but consider e.g. some high-dependency Rails model which requires auto-loading 10,000 other classes.