This is fundamentally flawed:
nodelist.delete_if {|new_entry| !new_entry.match(nodelist)}
In this, you're ignoring the method-local variable new_entry by adding a
block-local variable with the same name.
Assuming these are strings, and standardised (TOM does not equal Tom):
I'm not sure if this is an exercise of something, but what's important to note here is that you're doing everything in RAM. When having a list it's better to work with database, YAML or any XML format would be a good choice for similar sort of data.
On 23 Οκτ 2013, at 13:11 , Thiyagarajan V. <lists@ruby-forum.com> wrote:
--
The wise man said: "Never argue with an idiot. They bring you down to their level and beat you with experience."