briankung (Brian Kung)
- Login: briankung
- Registered on: 05/09/2018
- Last sign in: 10/28/2025
Issues
| open | closed | Total | |
|---|---|---|---|
| Assigned issues | 0 | 0 | 0 |
| Reported issues | 0 | 0 | 0 |
Activity
09/11/2025
-
03:02 AM Ruby Feature #12282: Hash#dig! for repeated applications of Hash#fetch
- How about `dig_cons()`, as in "dig consecutive," similar to `each_cons()`? They'd be different in that the argument to `each_cons` is how large each output slice is, whereas the arguments to `dig_cons` would represent consecutive keys in...
08/18/2025
-
02:51 PM Ruby Feature #12282: Hash#dig! for repeated applications of Hash#fetch
- Agreed, this feature would be useful. I would like to essentially assert that all of the nodes along the path are found.
To that end, I would suggest calling it something like `#fetch_path`:
``` ruby
object = {foo: {bar: { baz: tr...
01/15/2022
-
04:57 PM Ruby Feature #16986: Anonymous Struct literal
- duerst (Martin Dürst) wrote in #note-43:
> One more point: I haven't seen much examples of similar features in other languages.
Sorry to resurrect an old thread, but I just wanted to mention that this is a feature of the Zig programm...
09/24/2020
-
11:56 AM Ruby Feature #17184: No stdlib function to perform simple string replacement
- The hash replacement form of gsub doesn't have this problem, strangely enough:
``` ruby
'mislocated cat, vindicating'.gsub('cat', 'dog\+')
#=> "mislodoged dog, vindidoging"
'mislocated cat, vindicating'.gsub('cat', 'cat' => 'dog\+')
#=>...
05/17/2018
-
04:42 PM Ruby Feature #11747: "bury" feature, similar to 'dig' but opposite
- matz (Yukihiro Matsumoto) wrote:
> It's not clear to generate either Hash, Array, or Struct (or whatever) to bury a value.
Would it be desirable to specify the new object in a block? That would make it somewhat symmetrical to how `Ha...