Ruby we might Miss

This is a small series of posts about some everyday ruby we might miss but is very important.
I am going through Advanced Rails book.
I will be posting what I find very interesting !!
Every post will cover a major class:

Topic for this post :

(Sorry for poor formatting !! )
Array#* can operate as Array#join (if given a string or stringlike argument); it also does
[1, 2, 3] * “; ” # => “1; 2; 3”
[0] * 5 # => [0, 0, 0, 0, 0]


Array#pack and String#unpack are useful for working with binary files. why the lucky
stiff uses Array#pack to stuff a series of numbers into a BMP-formatted sparkline graph
without any heavy image libraries, in 13 lines of code (


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s