ref: refs/heads/master
commit fe42b73bf9901842ba7f2ef08161f78d88ed62d9
Author: Ladislav Slezak
Date: Fri Aug 14 12:29:06 2009 +0200
use zero? instead of == 0
---
plugins/system/app/models/system.rb | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/system/app/models/system.rb b/plugins/system/app/models/system.rb
index 079c635..bd88c59 100644
--- a/plugins/system/app/models/system.rb
+++ b/plugins/system/app/models/system.rb
@@ -48,7 +48,7 @@ class System
when :reboot
if ENV['RAILS_ENV'] == 'production'
Rails.logger.debug 'Rebooting the computer...'
- return computer.Reboot == 0
+ return computer.Reboot.zero?
else
Rails.logger.debug "Skipping reboot in #{ENV['RAILS_ENV']} mode"
return true
@@ -56,7 +56,7 @@ class System
when :shutdown
if ENV['RAILS_ENV'] == 'production'
Rails.logger.debug 'Shutting down the computer...'
- return computer.Shutdown == 0
+ return computer.Shutdown.zero?
else
Rails.logger.debug "Skipping shutdown in #{ENV['RAILS_ENV']} mode"
return true
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org