diff options
Diffstat (limited to 'spec/ruby/core/hash/shared/replace.rb')
| -rw-r--r-- | spec/ruby/core/hash/shared/replace.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/ruby/core/hash/shared/replace.rb b/spec/ruby/core/hash/shared/replace.rb index eb51130781..b3d098763b 100644 --- a/spec/ruby/core/hash/shared/replace.rb +++ b/spec/ruby/core/hash/shared/replace.rb @@ -32,19 +32,19 @@ describe :hash_replace, shared: true do hash_a.default(5).should == 10 hash_a = Hash.new { |h, k| k * 5 } - hash_b = Hash.new(lambda { raise "Should not invoke lambda" }) + hash_b = Hash.new(-> { raise "Should not invoke lambda" }) hash_a.send(@method, hash_b) hash_a.default.should == hash_b.default end it "raises a #{frozen_error_class} if called on a frozen instance that would not be modified" do - lambda do + -> do HashSpecs.frozen_hash.send(@method, HashSpecs.frozen_hash) end.should raise_error(frozen_error_class) end it "raises a #{frozen_error_class} if called on a frozen instance that is modified" do - lambda do + -> do HashSpecs.frozen_hash.send(@method, HashSpecs.empty_frozen_hash) end.should raise_error(frozen_error_class) end |
