# Re: newbie doesn't understand why's example

**URL:** <https://www.ruby-forum.com/t/re-newbie-doesnt-understand-whys-example/96315>\
**Category:** Ruby\
**Created:** [June 28, 2006, 3:13am UTC](https://www.ruby-forum.com/t/re-newbie-doesnt-understand-whys-example/96315 "2006-06-28T03:13:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PeSSSSaS\_Botp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ecd19e/32.png) [@PeSSSSaS\_Botp](https://www.ruby-forum.com/u/PeSSSSaS_Botp)\
**Post date:** [June 28, 2006, 3:13am UTC](https://www.ruby-forum.com/t/re-newbie-doesnt-understand-whys-example/96315/1 "2006-06-28T03:13:05Z")

</div>

fr dave:

# all of you, have all been some help here…but i’m still confused and

# i’m not trying split hairs here but what’s in the syntax of

# end.join(sep) or foo=foo.join(sep) that ruby doesn’t

# recursively recall

# arraymine’s join… another words based on previous why’s (or other

# tutorials that i’ve seen)

# def fact(n)

# if n=1 return 1

# else

# return n\*fact(n-1)\<\<\<\<what’s the difference in the syntax from

# ‘end.join(sep)’

# end

# end

# it’s still recalling the function’s name…

you’ll have to think ruby or oo, at least. remember, methods in ruby/oo  
are messages to receivers, and ergo they cannot stand alone. they may  
have the same name, but since they are applied (or belongs) to a  
different object, they are diff. ergo, you can create your own #join  
method, wc can be totally different fr other ruby’s builtin #join  
methods. ruby will apply the #join method you specify by it’s context,  
meaning, where you applied the method in the first place. So, if you use  
the #join method, as yourself, “join what?”.

check the diff/context of the ff:

x.join  
[1,2,3].join  
end.join  
{||}.join  
do||;end.join  
self.join  
join

some of these do not make sense (as they stand alone), but you’ll have  
to find that out for yourself why.

if you can grasp the concept of receivers/objects, then, you’ll be  
ready…  
the pickaxe book is great intro and so is slagell’s 21 days…

hey, i’m a nuby, too.

kind regards -botp
