Project

General

Profile

Actions

Feature #9402

open

A syntax to specify the default value of a hash

Added by alexeymuranov (Alexey Muranov) about 10 years ago. Updated about 2 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:<unknown>]

Description

I propose the following syntax to specify the default value of a hash:

h = { => 0, :a => 1, :b => 2 }
h[:a] # => 1
h[:c] # => 0
Actions #1

Updated by hsbt (Hiroshi SHIBATA) about 2 years ago

  • Project changed from 14 to Ruby master
Actions

Also available in: Atom PDF

Like0
Like0