Skip to content

Commit

Permalink
Use proc instead of lambda when the blocks don't accept args
Browse files Browse the repository at this point in the history
  • Loading branch information
dkubb committed May 25, 2010
1 parent 3fa8a40 commit 96b22b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/unit/sql/table_creator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
end

it 'should evaluate the given block' do
block = lambda { column :foo, :bar }
block = proc { column :foo, :bar }
col = mock('column')
SQL::TableCreator::Column.should_receive(:new).with(@adapter, :foo, :bar, {}).and_return(col)
tc = SQL::TableCreator.new(@adapter, 'users', {}, &block)
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/sql/table_modifier_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
end

it 'should evaluate the given block' do
block = lambda { column :foo, :bar }
block = proc { column :foo, :bar }
col = mock('column')
SQL::TableCreator::Column.should_receive(:new).with(@adapter, :foo, :bar, {}).and_return(col)
tc = SQL::TableCreator.new(@adapter, 'users', {}, &block)
Expand Down

0 comments on commit 96b22b4

Please sign in to comment.