summaryrefslogtreecommitdiff
path: root/spec/ruby/core/hash/dig_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/hash/dig_spec.rb')
-rw-r--r--spec/ruby/core/hash/dig_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/ruby/core/hash/dig_spec.rb b/spec/ruby/core/hash/dig_spec.rb
index dcba049ac4..aa0ecadd2f 100644
--- a/spec/ruby/core/hash/dig_spec.rb
+++ b/spec/ruby/core/hash/dig_spec.rb
@@ -28,7 +28,7 @@ describe "Hash#dig" do
end
it "raises an ArgumentError if no arguments provided" do
- lambda { { the: 'borg' }.dig() }.should raise_error(ArgumentError)
+ -> { { the: 'borg' }.dig() }.should raise_error(ArgumentError)
end
it "handles type-mixed deep digging" do
@@ -47,8 +47,8 @@ describe "Hash#dig" do
it "raises TypeError if an intermediate element does not respond to #dig" do
h = {}
h[:foo] = [ { bar: [ 1 ] }, [ nil, 'str' ] ]
- lambda { h.dig(:foo, 0, :bar, 0, 0) }.should raise_error(TypeError)
- lambda { h.dig(:foo, 1, 1, 0) }.should raise_error(TypeError)
+ -> { h.dig(:foo, 0, :bar, 0, 0) }.should raise_error(TypeError)
+ -> { h.dig(:foo, 1, 1, 0) }.should raise_error(TypeError)
end
it "calls #dig on the result of #[] with the remaining arguments" do