Browse files

Replace deprecated Kernel#returning with Object#tap

Change-Id: I568320d9bd4d3834ffbf903f068d0002c0846080
Reviewed-on: https://gerrit.causes.com/3502
Reviewed-by: Richard Zschech <richard.zschech@causes.com>
Tested-by: Greg Hurrell <greg@causes.com>
  • Loading branch information...
1 parent f7e49ed commit 79a220ce47d2d9152b75315fbb7ae57cf98b8e11 Greg Hurrell committed Feb 24, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/facebooker/models/user.rb
  2. +1 −1 lib/facebooker/rails/controller.rb
  3. +1 −1 lib/facebooker/rails/publisher.rb
View
2 lib/facebooker/models/user.rb
@@ -644,7 +644,7 @@ def ==(other_user)
def self.register(users)
user_map={}
users=users.map do |h|
- returning h.dup do |d|
+ h.dup.tap do |d|
if email=d.delete(:email)
hash = hash_email(email)
user_map[hash]=h
View
2 lib/facebooker/rails/controller.rb
@@ -311,7 +311,7 @@ def ensure_authenticated_to_facebook
def ensure_application_is_installed_by_facebook_user
@installation_required = true
- returning ensure_authenticated_to_facebook && application_is_installed? do |authenticated_and_installed|
+ (ensure_authenticated_to_facebook && application_is_installed?).tap do |authenticated_and_installed|
application_is_not_installed_by_facebook_user unless authenticated_and_installed
end
end
View
2 lib/facebooker/rails/publisher.rb
@@ -459,7 +459,7 @@ def initialize_template_class(assigns)
else
view_paths = [template_root, controller_root]
end
- returning ActionView::Base.new(view_paths, assigns, self) do |template|
+ ActionView::Base.new(view_paths, assigns, self).tap do |template|
template.controller=self
template.extend(self.class.master_helper_module)
def template.request_comes_from_facebook?

0 comments on commit 79a220c

Please sign in to comment.