I have:
array = ["this ends in log", "this ends in dog", "this is a log"]
I want to discard strings that end in the same word. How far off is my attempt?
array.reject { |i| i[0] =~ /\s\w$/ == i[1] =~ /\s\w$/ }
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-talk/-/lPOGHXmhnwIJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.