File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
spec/ruby/core/proc/shared Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 5
5
proc { |&b | b . send ( @method ) } . send ( @method ) { 1 + 1 } . should == 2
6
6
end
7
7
8
- it "Yield to the block given at declaration and not to the block argument" do
8
+ it "yields to the block given at declaration and not to the block argument" do
9
9
proc_creator = Object . new
10
10
def proc_creator . create
11
11
Proc . new do |&b |
12
12
yield
13
13
end
14
14
end
15
15
a_proc = proc_creator . create { 7 }
16
- a_proc . call { 3 } . should == 7
16
+ a_proc . send ( @method ) { 3 } . should == 7
17
17
end
18
18
19
- it "Can call its block argument declared with a block argument" do
19
+ it "can call its block argument declared with a block argument" do
20
20
proc_creator = Object . new
21
21
def proc_creator . create ( method_name )
22
22
Proc . new do |&b |
You can’t perform that action at this time.
0 commit comments