def battle
  # do something 
  if result=self.save
...

Ruby Unnecessary assignment near...

by https://www.google.com/accounts/o8/id?id=AItOawldXGtOvAVQC5k5Z7Y71zO75UzIQ98K5a0, December 12, 2011 07:36, 5 refactorings, tagged with return, observers

It feels like the assignmen...

55502f40dc8b7c769880b10874abc9d0 Talk
def id_found_or_limit_reached?
  if @upload_uuid || @request_uuid || (body.size > MAX_BODY)
    @data_buffer = nil
...

Ruby If statement with true retu...

by Dombesz, October 19, 2011 08:50, 7 refactorings, tagged with if else, return

The function should return ...

D41d8cd98f00b204e9800998ecf8427e Talk
def something
    retval = something()
    return retval if retval
...

Ruby return a value if the value...

by https://www.google.com/accounts/o8/id?id=AItOawmHJ1ONaW6q8tTA21erxFUKoFCJsNY0QiE, February 23, 2011 14:23, 3 refactorings, tagged with ruby, return

I often find myself writing...

55502f40dc8b7c769880b10874abc9d0 Talk
def check_appt_conflicts()
    appointments.each do |appointment|
...

Ruby Return from function within...

by ttdavett.myopenid.com, April 22, 2009 23:36, 10 refactorings, tagged with rails, ruby, function, return

Is there a way to break/esc...

F677fa685a2cfe8aff31f161062db3d3 Talk