On Aug 29, 2012, at 3:27 PM, Tomáš Hrčka <[email protected]> wrote:
Hi, Is the 'return' statement here really needed? ;-) Ruby blocks tends to return the value of the last statement inside that block. So the 'case' block will return the matched value. -- Michal > --- > src/app/util/taskomatic.rb | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/app/util/taskomatic.rb b/src/app/util/taskomatic.rb > index 1708970..44f6707 100644 > --- a/src/app/util/taskomatic.rb > +++ b/src/app/util/taskomatic.rb > @@ -116,6 +116,8 @@ module Taskomatic > return Instance::STATE_STOPPED > when 'SHUTTING_DOWN' > return Instance::STATE_SHUTTING_DOWN > + when 'STOPPING' > + return Instance::STATE_SHUTTING_DOWN > else > return Instance::STATE_PENDING > end > -- > 1.7.11.4 >
