summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2015-02-18 16:20:51 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2015-02-18 16:20:51 -0800
commit7d23af1302df15ee5e2b2213dd326b4151f26ff4 (patch)
tree1db93feb51115413b07c2d94a4e14ecdbf4d94ff
parent612deac15d67a2788ab015c8b2d20756614285f0 (diff)
downloadchef-7d23af1302df15ee5e2b2213dd326b4151f26ff4.tar.gz
fix Lint/LiteralInCondition
-rw-r--r--lib/chef/knife/ssh.rb2
-rw-r--r--lib/chef/util/path_helper.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb
index de4c60d998..4569cc097e 100644
--- a/lib/chef/knife/ssh.rb
+++ b/lib/chef/knife/ssh.rb
@@ -313,7 +313,7 @@ class Chef
puts
puts "To exit interactive mode, use 'quit!'"
puts
- while 1
+ loop do
command = read_line
case command
when 'quit!'
diff --git a/lib/chef/util/path_helper.rb b/lib/chef/util/path_helper.rb
index a5485a864b..1ae489598d 100644
--- a/lib/chef/util/path_helper.rb
+++ b/lib/chef/util/path_helper.rb
@@ -26,7 +26,7 @@ class Chef
if Chef::Platform.windows?
# Find the first slash, not counting trailing slashes
end_slash = path.size
- while true
+ loop do
slash = path.rindex(/[#{Regexp.escape(File::SEPARATOR)}#{Regexp.escape(path_separator)}]/, end_slash - 1)
if !slash
return end_slash == path.size ? '.' : path_separator