Stefano Crocco
8/10/2007 5:52:00 PM
Alle venerdì 10 agosto 2007, Joshua Muheim ha scritto:
> Hi all
>
> irb(main):001:0> conversion_classes = {
> irb(main):002:1* 'Music labels' => 'MusicLabel',
> irb(main):003:1* 'Music artists' => 'MusicArtist',
> irb(main):004:1* 'Online Shops' => 'OnlineShop',
> irb(main):005:1* 'Psy Communities' => 'PsyCommunity',
> irb(main):006:1* }
> => {"Psy Communities"=>"PsyCommunity", "Music labels"=>"MusicLabel",
> "Online Shops"=>"OnlineShop", "Music artists"=>"MusicArtist"}
> irb(main):007:0> conversion_classes.has_key? "Music Labels"
> => false
>
> What the heck is wrong here? I'm feeling quite blind at the moment, lol!
>
> Thanks
> Josh
I'd say because in the hash you set the key 'Music labels', then you ask if it
has the key 'Music Labels'.
Stefano