Project

General

Profile

Feature #14559

ENV.slice

Added by sawa (Tsuyoshi Sawada) over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Target version:
-
[ruby-core:85858]

Description

I would like to request ENV.slice, which should behave analogous to Hash#slice.

ENV.slice("PATH", "FOO")
# => {"PATH" => "/foo:/bar", "FOO" => "foo"}

Files

env_slice.patch (2.23 KB) env_slice.patch Benoit_Tigeot (Benoit Tigeot), 03/29/2018 04:01 PM

Associated revisions

Revision 9760a7f9
Added by nobu (Nobuyoshi Nakada) over 1 year ago

Add slice method to ENV like Hash#slice

[Feature #14559]

From: Benoit Tigeot benoit@hopsandfork.com

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 63188
Added by nobu (Nobuyoshi Nakada) over 1 year ago

Add slice method to ENV like Hash#slice

[Feature #14559]

From: Benoit Tigeot benoit@hopsandfork.com

Revision 63188
Added by nobu (Nobuyoshi Nakada) over 1 year ago

Add slice method to ENV like Hash#slice

[Feature #14559]

From: Benoit Tigeot benoit@hopsandfork.com

History

#2

Updated by Benoit_Tigeot (Benoit Tigeot) over 1 year ago

  • File env_slice.patch added

Updated by hsbt (Hiroshi SHIBATA) over 1 year ago

  • Assignee set to matz (Yukihiro Matsumoto)
  • Status changed from Open to Assigned
#5

Updated by Benoit_Tigeot (Benoit Tigeot) over 1 year ago

  • File deleted (env_slice.patch)

Updated by Benoit_Tigeot (Benoit Tigeot) over 1 year ago

I've re-submitted the patch with correct test order (https://github.com/ruby/ruby/pull/1844). Thanks, Matz, Mame and Matz for your help during last ruby hack challenge.

Updated by matz (Yukihiro Matsumoto) over 1 year ago

It seems OK to me.

Matz.

#8

Updated by nobu (Nobuyoshi Nakada) over 1 year ago

  • Status changed from Assigned to Closed

Applied in changeset trunk|r63188.


Add slice method to ENV like Hash#slice

[Feature #14559]

From: Benoit Tigeot benoit@hopsandfork.com

Also available in: Atom PDF