Skip to content

Commit 161a787

Browse files
committedFeb 6, 2016
don't use single letter variable names [ci skip]
1 parent 7a8f1dc commit 161a787

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed
 

‎spec/ruby/core/module/define_method_spec.rb

+7-7
Original file line numberDiff line numberDiff line change
@@ -188,16 +188,16 @@ def cool_method
188188
end
189189
end
190190

191-
o = ProcFromMethod.new
192-
o.data = :foo
191+
object1 = ProcFromMethod.new
192+
object1.data = :foo
193193

194-
p = o.method(:cool_method).to_proc
194+
method_proc = object1.method(:cool_method).to_proc
195195
klass = Class.new(ProcFromMethod)
196-
klass.send(:define_method, :other_cool_method, p)
196+
klass.send(:define_method, :other_cool_method, &method_proc)
197197

198-
object = klass.new
199-
object.data = :bar
200-
object.other_cool_method.should == "data is foo"
198+
object2 = klass.new
199+
object2.data = :bar
200+
object2.other_cool_method.should == "data is foo"
201201
end
202202

203203
it "maintains the Proc's scope" do

0 commit comments

Comments
 (0)
Please sign in to comment.