summaryrefslogtreecommitdiff
path: root/include/ruby/encoding.h
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2021-06-08 10:19:08 -0700
committerGitHub <noreply@github.com>2021-06-08 10:19:08 -0700
commit117310bdc00236c0a7676616ce25b5106775dabc (patch)
tree3a9711e9446d22bca99c8a56e8ceff723f0c8f04 /include/ruby/encoding.h
parent8c87efaa8a45166ed977294330c32a4b186b8e7b (diff)
Make ENV.clone warn and ENV.dup raise
ENV.dup returned a plain Object, since all of ENV's behavior is defined in ENV's singleton class. So using dup makes no sense. ENV.clone works and is used in some gems, but it doesn't do what the user expects, since modifying ENV.clone also modifies ENV. Add a deprecation warning pointing the user to use ENV.to_h instead. This also undefines some private initialize* methods in ENV, since they are not needed. Fixes [Bug #17767]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4557 Merged-By: jeremyevans <code@jeremyevans.net>
Diffstat (limited to 'include/ruby/encoding.h')
0 files changed, 0 insertions, 0 deletions