Did the author of the feature missed Perl or something ?
Perl does that with few thing, like regexp captures. It's kinda sorta neat for writing shell oneliners but that's about it. But then concise and intelligent design wasn't ever Ruby's forte.
Perl does that with few thing, like regexp captures. It's kinda sorta neat for writing shell oneliners but that's about it. But then concise and intelligent design wasn't ever Ruby's forte.
Including $1 etc. for regexp captures, and a litany of other "$" variables.
If anything, those parts of Ruby's design tend to be among the aspects most often maligned, and we have to excuse it with "Perl did it, blame Perl".
Ruby is in many way the unholy offspring of Perl and Smalltalk. And I mean that mostly in a good way, but it also gave us warts.