We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a4e4957 + d86589b commit 49ae2a4Copy full SHA for 49ae2a4
spec/ruby/core/hash/shared/each.rb
@@ -28,11 +28,11 @@ def obj.foo(key, value)
28
end
29
30
ScratchPad.record([])
31
- { "a" => 1 }.each(&obj.method(:foo))
+ { "a" => 1 }.send(@method, &obj.method(:foo))
32
ScratchPad.recorded.should == ["a", 1]
33
34
35
- { "a" => 1 }.each(&-> key, value { ScratchPad << key << value })
+ { "a" => 1 }.send(@method, &-> key, value { ScratchPad << key << value })
36
37
38
0 commit comments