josh
1
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
josh
2
Alle venerdì 10 agosto 2007, Joshua M. ha scritto:
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
josh
3
Hi –
On Sat, 11 Aug 2007, Joshua M. wrote:
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!
You’re capitalizing “Labels”.
David
josh
4
I’m really a genius… thanks good it’s weekend now =)
Thank you guys
josh
5
Joshua M. wrote:
irb(main):002:1* ‘Music labels’ => ‘MusicLabel’,
sion_classes.has_key? “Music Labels”
What the heck is wrong here? I’m feeling quite blind at the moment, lol!
I lined them up (for proportional fonts). See the difference yet?
josh
6
On 8/10/07, Joshua M. [email protected] wrote:
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!
You’re creating the key with a lowercase ‘l’ and trying to read it out
with a capital ‘L’…
Is that the blunder?
hth,
-Harold