Skip to content

Commit

Permalink
Hash#replace: Guard #freeze bug #1571.
Browse files Browse the repository at this point in the history
  • Loading branch information
runpaint committed Jun 5, 2009
1 parent 74d8da5 commit e1171b0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions core/hash/shared/replace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@
end

ruby_version_is "1.9" do
it "raises a RuntimeError if called on a frozen instance" do
lambda { HashSpecs.frozen_hash.send(@method, HashSpecs.frozen_hash) }.
should raise_error(RuntimeError)
lambda { HashSpecs.frozen_hash.send(@method, HashSpecs.empty_frozen_hash) }.
should raise_error(RuntimeError)
ruby_bug "#1571", "1.9.2" do
it "raises a RuntimeError if called on a frozen instance" do
lambda { HashSpecs.frozen_hash.send(@method, HashSpecs.frozen_hash) }.
should raise_error(RuntimeError)
lambda { HashSpecs.frozen_hash.send(@method, HashSpecs.empty_frozen_hash) }.
should raise_error(RuntimeError)
end
end
end
end

0 comments on commit e1171b0

Please sign in to comment.