summaryrefslogtreecommitdiff
path: root/spec/ruby/core/env/dup_spec.rb
blob: 46d125aca8af8f22045faa35f81b9af4de626d93 (plain)
1
2
3
4
5
6
7
8
9
10
11
require_relative '../../spec_helper'

describe "ENV#dup" do
  ruby_version_is "3.1" do
    it "raises TypeError" do
      -> {
        ENV.dup
      }.should raise_error(TypeError, /Cannot dup ENV, use ENV.to_h to get a copy of ENV as a hash/)
    end
  end
end