class String define_method('last') do |n| self[-n, n] endendp "Here's a string.".last(7) # => "string."