From: andrew@... Date: 2014-08-14T00:26:46+00:00 Subject: [ruby-core:64350] [ruby-trunk - Feature #10130] String format with nested hash Issue #10130 has been updated by Andrew Vit. I would have expected [] for hash syntax in the string template: ~~~ "Author: %{author[:name]} (%{author[:affiliation]}), %{date}" ~~~ For it to work with dots seems inconsistent, unless the hash value responds to those methods. ---------------------------------------- Feature #10130: String format with nested hash https://bugs.ruby-lang.org/issues/10130#change-48327 * Author: Tsuyoshi Sawada * Status: Open * Priority: Normal * Assignee: * Category: * Target version: ---------------------------------------- When we do string format with hashes, we have the restriction that the hash cannot be a nested one. When we want to handle more complicated string formats, for example in templates, it is more convenient if we can use a nested hash. "Author: %{author.name} (%{author.affiliation}), %{date}" % {author: {name: "Ruby Taro", affiliation: "Ruby co."}, date: "2014, 8, 14"} #=> "Author: Ruby Taro (Ruby co.), 2014, 8, 14" -- https://bugs.ruby-lang.org/