# \[FAQ\] \[Revised again\] What are the non-alphanumerical symbols in Ruby code?

**URL:** <https://rubytalk.org/t/faq-revised-again-what-are-the-non-alphanumerical-symbols-in-ruby-code/3268>\
**Category:** ruby-talk\
**Created:** [3 December 2002 12:49 UTC](https://rubytalk.org/t/faq-revised-again-what-are-the-non-alphanumerical-symbols-in-ruby-code/3268 "2002-12-03T12:49:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Austin\_Ziegler2](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@Austin\_Ziegler2](https://rubytalk.org/u/Austin_Ziegler2)\
**Post date:** [3 December 2002 12:49 UTC](https://rubytalk.org/t/faq-revised-again-what-are-the-non-alphanumerical-symbols-in-ruby-code/3268/1 "2002-12-03T12:49:57Z")

</div>

> In article [04af01c299e6$e35ebdc0$d44532d2@nosedog](mailto:04af01c299e6$e35ebdc0$d44532d2@nosedog) , Gavin  
> Sinclair  
> wrote:  
> […]
> 
> > \<\<
> > 
> > 1. Appends an Array or String in place.
> > 
> > a = [1,2,3]  
> > a \<\< 4 # a == [1,2,3,4]  
> > It would be nice if you mentioned that in this case \<\< is just a  
> > method which people can define on their own classes.

IMO, this “\<\<” definitely belongs with the other bit-operators,  
because they are overloadable methods as well. There are a couple of  
places in Ruby where “\>\>” has also been defined, IIRC.

-austin  
– Austin Ziegler, austin@halostatue.ca on 2002.12.03 at 07.47.39

> **···**
>
> On Tue, 3 Dec 2002 16:31:26 +0900, Tim Sutherland wrote:

---

<div class="post-metadata">

**Author:** ![Martin\_DeMello1](https://avatars.discourse-cdn.com/v4/letter/m/3be4f8/32.png) [@Martin\_DeMello1](https://rubytalk.org/u/Martin_DeMello1)\
**Post date:** [3 December 2002 13:12 UTC](https://rubytalk.org/t/faq-revised-again-what-are-the-non-alphanumerical-symbols-in-ruby-code/3268/2 "2002-12-03T13:12:32Z")

</div>

IMO, since \<\< is encountered far more often in code examples than the  
other bit operators, giving it a special place is warranted within this  
particular FAQ.

martin

> **···**
>
> Austin Ziegler [austin@halostatue.ca](mailto:austin@halostatue.ca) wrote:
> 
> > On Tue, 3 Dec 2002 16:31:26 +0900, Tim Sutherland wrote:
> > 
> > > In article [04af01c299e6$e35ebdc0$d44532d2@nosedog](mailto:04af01c299e6$e35ebdc0$d44532d2@nosedog) , Gavin  
> > > Sinclair  
> > > wrote:  
> > > […]
> > > 
> > > > \<\<
> > > > 
> > > > 1. Appends an Array or String in place.
> > > > 
> > > > a = [1,2,3]  
> > > > a \<\< 4 # a == [1,2,3,4]  
> > > > It would be nice if you mentioned that in this case \<\< is just a  
> > > > method which people can define on their own classes.
> > 
> > IMO, this “\<\<” definitely belongs with the other bit-operators,  
> > because they are overloadable methods as well. There are a couple of  
> > places in Ruby where “\>\>” has also been defined, IIRC.
