From 61b991486125fa1671d9037b0aea8661d984fb7d Mon Sep 17 00:00:00 2001 From: Sven Aas Date: Fri, 29 Jul 2011 12:38:12 -0400 Subject: [PATCH] Replace deprecated Kernel#returning method. --- lib/technoweenie/attachment_fu.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/technoweenie/attachment_fu.rb b/lib/technoweenie/attachment_fu.rb index e282825b..01961316 100644 --- a/lib/technoweenie/attachment_fu.rb +++ b/lib/technoweenie/attachment_fu.rb @@ -409,7 +409,7 @@ def random_tempfile_filename def sanitize_filename(filename) return unless filename - returning filename.strip do |name| + filename.strip.tap do |name| # NOTE: File.basename doesn't work right with Windows paths on Unix # get only the filename, not the whole path name.gsub! /^.*(\\|\/)/, ''