[#71439] [Ruby trunk - Feature #11339] [PATCH] io.c: avoid kwarg parsing in C API — matz@...
Issue #11339 has been updated by Yukihiro Matsumoto.
7 messages
2015/11/11
[#71473] Re: [Ruby trunk - Feature #11339] [PATCH] io.c: avoid kwarg parsing in C API
— Eric Wong <normalperson@...>
2015/11/13
Entire series for sockets
[#71450] Ruby 2.3.0-preview1 Released — "NARUSE, Yui" <naruse@...>
Hi,
5 messages
2015/11/11
[#71617] [Ruby trunk - Feature #11664] [PATCH] introduce rb_autoload_value to replace rb_autoload — nobu@...
Issue #11664 has been updated by Nobuyoshi Nakada.
3 messages
2015/11/20
[#71721] [Ruby trunk - Feature #11741] Migrate Ruby to Git from Subversion — me@...
Issue #11741 has been updated by Jon Moss.
4 messages
2015/11/28
[ruby-core:71709] [Ruby trunk - Feature #11747] [Open] "bury" feature, similar to 'dig' but opposite
From:
dameyawn@...
Date:
2015-11-27 20:16:38 UTC
List:
ruby-core #71709
Issue #11747 has been reported by damien sutevski. ---------------------------------------- Feature #11747: "bury" feature, similar to 'dig' but opposite https://bugs.ruby-lang.org/issues/11747 * Author: damien sutevski * Status: Open * Priority: Normal * Assignee: Yukihiro Matsumoto ---------------------------------------- In Matz's recent Rubyconf talk, he used this example for the new 'dig' feature coming in Ruby 2.3: \# we want this data[:users][0][:name] \# we can do this w/o nil errors data.dig(:users, 0, :name) What I'm proposing is a 'bury' feature that is the opposite of 'dig' in a sense. It inserts a value at an arbitrary depth, for example: data.bury(:users, 0, :name, 'Matz') This will create a nested hash or an array automatically at each step if it doesn't already exist, and that can be inferred from the what the user is passing (such as a symbol or string for a hash or an integer for an array). It's similar to autovivification but more powerful! This behavior is very common, at least in my experience, so a dry method built into Ruby would be awesome! -- https://bugs.ruby-lang.org/