Permalink
Browse files

Rename inner variable to prevent warning under 1.9

When using Ruby versions >= 1.9 to run scripts via CMD-R, the warning
"shadowing outer local variable" is generated (assuming the -w switch
is set) and copied to the output window.

Rename the inner variable to avoid the message and get a clean output.
  • Loading branch information...
Kai Brust authored and infininight committed Apr 9, 2013
1 parent b67ea35 commit 4a0da3bf8d5ec17194f583ac4d6b7633e263262f
Showing with 1 addition and 1 deletion.
  1. +1 −1 Support/RubyMate/catch_exception.rb
@@ -22,7 +22,7 @@
file, line, method = $1, $2, $3
url, display_name = '', file
- path = dirs.map{ |dir| File.expand_path(file, dir) }.find{ |path| File.file? path }
+ path = dirs.map{ |dir| File.expand_path(file, dir) }.find{ |filename| File.file? filename }
unless path.nil?
url, display_name = '&url=file://' + e_url(path), File.basename(path)
end

0 comments on commit 4a0da3b

Please sign in to comment.