Hi Raul,

I wrote a long reply to your message on the google groups discussion page
and not sure why it never posted.  I posted it yetserday.

So what I wrote briefly was that, yes, I did realize that the .first and
.last methods were instance methods of array type.  However, my confusion
was more of why 'element' would even have more than one array element
because inject is suppose to grab one element at a time.  The only
conclusion I could come up with is this.  I read that Ruby does not support
array of arrays.  If this is the case, I was thinking that Ruby is treating
the arrays within the array, each as an element (containing elements)?  Is
that why when inject grabs the first element, it is an array of :first_name
and 'Shane'?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "ruby-on-rails-programming-with-passion" group.
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/ruby-on-rails-programming-with-passion?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to