Skip to content

Instantly share code, notes, and snippets.

@martinos

martinos/- Secret

Last active October 18, 2017 11:40
Show Gist options
  • Save martinos/285e6442bc909a59d99bddc1956ed8ab to your computer and use it in GitHub Desktop.
Save martinos/285e6442bc909a59d99bddc1956ed8ab to your computer and use it in GitHub Desktop.
icr(0.23.1) > init = {"Joe" => {"age" => 34}}
=> {"Joe" => {"age" => 34}}
icr(0.23.1) > [["Bob", {"age" => 55}]].reduce(init) { |memo, (k,v)| memo[k] = v ; memo}
no overload matches 'Hash(String, Hash(String, Int32))#[]=' with types (Hash(String, Int32) | String), (Hash(String, Int32) | String)
Overloads are:
- Hash(K, V)#[]=(key : K, value : V)
Couldn't find overloads for these types:
- Hash(String, Hash(String, Int32))#[]=(key : Hash(String, Int32), value : Hash(String, Int32))
- Hash(String, Hash(String, Int32))#[]=(key : Hash(String, Int32), value : String)
- Hash(String, Hash(String, Int32))#[]=(key : String, value : String)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment