使用ruby splat操作符在哪里合法?
Splatsarecool.They'renotjustforexplodingarrays,althoughthatisfun.TheycanalsocasttoArrayandflattenarrays(Seehttp://github.com/mischa/splat/tree/masterf...
如何使用ruby splat运算符?我们能对它做一些操作吗?
Theconfusingcase:令人困惑的案例:arr=[:one,:two]attr_accessor*arr+[:three]Inthiscase,itseemsthatwedoa+operationonthesplat*arr.But,generallywecan'tperformanyop...