I have the following script that I just have only slight changes in the
hash from "Why's poignant guide to Ruby" book:

http://pastie.org/private/ojmcfglofwloqemqmuhra

I have those questions regarding the script:

1- I have inserted this method call after the class:

puts "Abder-Rahman-is-my-name".name_significance


And, got the following message:

sub.rb:7:in `name_significance': undefined method `[]' for nil:NilClass
(NoMethodError)
        from sub.rb:6:in `collect'
        from sub.rb:6:in `name_significance'
        from sub.rb:13

How can I call the name_significance method?

2- How can I use the @@syllables? Or, more specific, what is the use of
@@syllables here while I conclude that the purpose of this modification
to the class String is to remove '-'?

3- Why all that code if the purpose is removing '-', such that we ONLY
need self.split( '-' ) in the body of name_significance here?

Thanks.
-- 
Posted via http://www.ruby-forum.com/.