diff options
| author | schneems <richard.schneeman+foo@gmail.com> | 2020-10-26 13:46:40 -0500 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-10-04 12:21:27 +0900 |
| commit | 3c54b8e9205fa8debe09447138fd08aeaa59e69c (patch) | |
| tree | e2ad48df56f57cf3651ca2a44759b7da796a3281 /include/ruby/internal/intern | |
| parent | 08346e7267b4f17ae207d67543d5f78c2541dc86 (diff) | |
Allow method chaining with Pathname#mkpath
Currently in my code when I want to create a pathname object and create a path at the same time I must use tap
```
path = Pathname.new("/tmp/new").tap(&:mkpath)
```
I think it would be cleaner to be able to chain on the results of these methods instead:
```
path = Pathname.new("/tmp/new").mkpath
```
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3705
Diffstat (limited to 'include/ruby/internal/intern')
0 files changed, 0 insertions, 0 deletions
