Skip to content

Commit

Permalink
don't use #tap so 1.8.x works
Browse files Browse the repository at this point in the history
  • Loading branch information
nickrivadeneira committed May 31, 2011
1 parent 54158c7 commit e036484
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ tmp
pkg
.swo
*~

*.gem
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
appraisal (0.3.4)
appraisal (0.3.5)
aruba (~> 0.3.6)
bundler
rake
Expand Down
6 changes: 3 additions & 3 deletions lib/appraisal/file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ def each(&block)
end

def appraise(name, &block)
@appraisals << Appraisal.new(name, gemfile).tap do |appraisal|
appraisal.instance_eval(&block)
end
appraisal = Appraisal.new(name, gemfile)
appraisal.instance_eval(&block)
@appraisals << appraisal
end

private
Expand Down
12 changes: 6 additions & 6 deletions lib/appraisal/gemfile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ def to_s
end

def dup
Gemfile.new.tap do |gemfile|
gemfile.source @source
dependencies.values.each do |dependency|
gemfile.gem(dependency.name, *dependency.requirements)
end
gemfile.gemspec(@gemspec.options) if @gemspec
gemfile = Gemfile.new
gemfile.source @source
dependencies.values.each do |dependency|
gemfile.gem(dependency.name, *dependency.requirements)
end
gemfile.gemspec(@gemspec.options) if @gemspec
gemfile
end

def gemspec(options = {})
Expand Down

0 comments on commit e036484

Please sign in to comment.