Topic: is this code valid?

Does the return method actually do what I think it does? i.e. terminate processing of the function containing it and return a value?

def is_something_true

if someting_is_true
  return true
end

if something_else_is_true
  return true
end

return false
end

Last edited by markhorrocks (2011-08-18 01:11:20)

Re: is this code valid?

Yes it does.