For whom who is going to undertake RoR/Ruby or general software development position, your employer might give you some sort of short test for Round 1. Anagram is probably one of the good question that they might ask. Because it is a simple test yet involves many techniques that a code reviewer could testify your competence in programming. Here is one of the test question from a Ruby job interview that I had:
Given a file containing one word per line, print out all the combinations of words that are anagrams; each line in the output should contain a set of input words that are anagrams of each other. No word should appear in the output more than once
For added programming pleasure, find the longest words that are anagrams, and the set of anagrams containing the most words.
From the employer perspective, they will pay attention in how you approach this problem and the methodology how you test it too. There are many ways to tackle this question, however I guess the best way is to use Hash due to its n log(n) algorithm is more efficient than other methods. Additionally, an unit test with RSpec would be a plus. Please check my code at: