as we know that ruby core guys just released ruby
1.9-something-something (i don't really remember
just glanced at it cos what i usually do is just
svn update from its trunk).

we also might know that ruby 1.9-something repack
version for Array#compact method behave [ :a, :b,
[ :a, :b ] ] so not [ :a, :b, :a, :b ] anymore
just like ruby-1.8-something.

What i want to ask is more about language design
cos I might've lost reading it from ruby-core
mailing list and i've tried googling around but
found nothing, what's the meaning of ruby compact
actually if its output return result is just the
same like the array before.

ex.

a = [ :a, :b, :c ]
a << [ :a, :b ]
=> [ :a, :b, :c, [ :a, :b ] ]
a.compact
=> [ :a, :b, :c, [ :a, :b ] ]

fyi ri documentation still refers to the old
documentation ( yup, ri19 if it's ruby19 ) so we
can't rely on documentation that much for trunk
version.


-- 
r9 = { name: Rie!, ym: riyari3, skype: rubyninja,
blog: http://tinyurl.com/2bjgvn,
ruby: http://www.ruby-lang.org/id/about/ }

Kirim email ke