>> pp words.filter(:num_anagrams > 11).group_by(:alphagram).select(:word).map
[{:"`word`"=>"TARSEL"},
 {:"`word`"=>"TESLA"},
 {:"`word`"=>"SPEAR"},
 {:"`word`"=>"TERAS"}]

Note that the key is :"`word`" rather than :word

However, if I use either select or group_by separately, this doesn't
happen (long output appended after post). Is this a bug?

martin

>> pp words.filter(:num_anagrams > 11).select(:word).map
[{:word=>"APERS"},
 {:word=>"APRES"},
 {:word=>"ARETS"},
 {:word=>"ASPER"},
 {:word=>"ASTER"},
 {:word=>"EARST"},
 {:word=>"LEAST"},
 {:word=>"LEATS"},
 {:word=>"PARES"},
 {:word=>"PARSE"},
 {:word=>"PEARS"},
 {:word=>"PRASE"},
 {:word=>"PRESA"},
 {:word=>"RAPES"},
 {:word=>"RATES"},
 {:word=>"REAPS"},
 {:word=>"REAST"},
 {:word=>"RESAT"},
 {:word=>"SALET"},
 {:word=>"SETAL"},
 {:word=>"SLATE"},
 {:word=>"SPAER"},
 {:word=>"SPARE"},
 {:word=>"SPEAR"},
 {:word=>"STALE"},
 {:word=>"STARE"},
 {:word=>"STEAL"},
 {:word=>"STEAR"},
 {:word=>"STELA"},
 {:word=>"STRAE"},
 {:word=>"TAELS"},
 {:word=>"TALES"},
 {:word=>"TARES"},
 {:word=>"TASER"},
 {:word=>"TEALS"},
 {:word=>"TEARS"},
 {:word=>"TERAS"},
 {:word=>"TESLA"},
 {:word=>"ALERTS"},
 {:word=>"ALTERS"},
 {:word=>"ARTELS"},
 {:word=>"ESTRAL"},
 {:word=>"LASTER"},
 {:word=>"RATELS"},
 {:word=>"SALTER"},
 {:word=>"SLATER"},
 {:word=>"STALER"},
 {:word=>"STELAR"},
 {:word=>"TALERS"},
 {:word=>"TARSEL"}]

>> pp words.filter(:num_anagrams > 11).group_by(:alphagram).map
[{:word=>"TARSEL",
  :length=>6,
  :combinations=>216720,
  :probability_order=>619,
  :min_probability_order=>575,
  :max_probability_order=>673,
  :alphagram=>"AELRST",
  :num_anagrams=>12,
  :num_unique_letters=>6,
  :num_vowels=>2,
  :point_value=>6,
  :front_hooks=>nil,
  :back_hooks=>"s",
  :is_front_hook=>0,
  :is_back_hook=>0,
  :lexicon_symbols=>nil,
  :definition=>"a male hawk, also TARCEL, TASSELL [n -S]"},
 {:word=>"TESLA",
  :length=>5,
  :combinations=>31176,
  :probability_order=>470,
  :min_probability_order=>415,
  :max_probability_order=>529,
  :alphagram=>"AELST",
  :num_anagrams=>12,
  :num_unique_letters=>5,
  :num_vowels=>2,
  :point_value=>5,
  :front_hooks=>nil,
  :back_hooks=>"s",
  :is_front_hook=>0,
  :is_back_hook=>0,
  :lexicon_symbols=>nil,
  :definition=>"a unit of magnetic induction [n -S]"},
 {:word=>"SPEAR",
  :length=>5,
  :combinations=>18972,
  :probability_order=>1634,
  :min_probability_order=>1388,
  :max_probability_order=>1859,
  :alphagram=>"AEPRS",
  :num_anagrams=>13,
  :num_unique_letters=>5,
  :num_vowels=>2,
  :point_value=>7,
  :front_hooks=>nil,
  :back_hooks=>"sy",
  :is_front_hook=>1,
  :is_back_hook=>0,
  :lexicon_symbols=>nil,
  :definition=>"to pierce with a long pointed weapon [v -ED, -ING, -
S]"},
 {:word=>"TERAS",
  :length=>5,
  :combinations=>43380,
  :probability_order=>148,
  :min_probability_order=>102,
  :max_probability_order=>193,
  :alphagram=>"AERST",
  :num_anagrams=>13,
  :num_unique_letters=>5,
  :num_vowels=>2,
  :point_value=>5,
  :front_hooks=>nil,
  :back_hooks=>nil,
  :is_front_hook=>1,
  :is_back_hook=>0,
  :lexicon_symbols=>nil,
  :definition=>"a monstrosity [n TERATA]"}]



 words.filter(:num_anagrams > 9).group_by(:alphagram).select
(:word).map
=> [{:"`word`"=>"SERINGA"}, {:"`word`"=>"TASERING"},
{:"`word`"=>"TSIGANE"}, {:"`word`"=>"STEARIN"}, {:"`word`"=>"SPEAL"},
{:"`word`"=>"TEPALS"}, {:"`word`"=>"TARSEL"}, {:"`word`"=>"TESLA"},
{:"`word`"=>"SPEAR"}, {:"`word`"=>"TERAS"}, {:"`word`"=>"TREES"}]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
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/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to