Skip to content

Commit

Permalink
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/regression/GH-4029_Hash_aref_with_string_dedefd_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class GH4029Hash < Hash
undef :[]
end

describe "Hash" do
it "will raise a NoMethodError and not crash" do
expect { GH4029Hash.new["o"] }.to raise_error(NoMethodError)
end
end

0 comments on commit 4f2ec94

Please sign in to comment.