rod mclaughlin


self and other in ruby (24 may 11)

You can study academic courses in something called 'othering'. It means 'fear of the other'. The utopian assumption is that other people are just like you. But 'self.dup' has a double meaning:

class Array
  def drop!( max )
    other = self.dup
    other = self.drop(  self.size - max  ) if self.size > max
    self.clear
    self.concat other
    self
  end
end



Back
Portland London