Since what version of Ruby does “String#split /(whatever)/” returns the
delimiters in the result?
In other words, since what version it’s possible, as in Perl, to put
parentheses is the regexp and have them returned?
(I’m using Ruby 1.8)
I’ve looked into the documentation of String#split, but it doens’t
mention this feature, so I’m asking you.
That's exasperating. In the past I used to love Ruby. But nowadays you
have to be a lawyer, or a historion, if you want to use it. There are
several "version 1.8" with different APIs and whenever you want to use
some feature you're worried perhaps it won't be supported by whoever
runs your program. "Writing Ruby is like writing literature" my foot.
In message “Re: String#split and capturing delimiters”
on Fri, 30 Oct 2009 16:45:23 +0900, Albert S. [email protected] writes:
|Since what version of Ruby does “String#split /(whatever)/” returns the
|delimiters in the result?
From the beginning. It has been there at least since 0.49 back in
July 1994, which is the oldest source code available at hand, far
before the public release.
|That’s exasperating. In the past I used to love Ruby. But nowadays you
|have to be a lawyer, or a historion, if you want to use it.
That’s unfortunate. I guess you’ve changed the attitude toward the
language, nowadays.
|Since what version of Ruby does “String#split /(whatever)/” returns the
|delimiters in the result?
From the beginning. It has been there at least since 0.49 back in
July 1994, which is the oldest source code available at hand, far
before the public release.
Thanks!
(It’s just that not very long ago I’ve read in some CHNAGELOG something
along the line of “now String#split behaves more like Perl’s”, and this
caused me to have a second thought before using the “capturing”
feature.)
|That’s exasperating. In the past I used to love Ruby. But nowadays you
|have to be a lawyer, or a historion, if you want to use it.
That’s unfortunate. I guess you’ve changed the attitude toward the
language, nowadays.
I wish to apologize for my rant. What I wrote was merely “air venting”;
it wasn’t actually about Ruby. I utilized the fact that Ruby-talk isn’t
only for getting technical answers but also for “hugs” in times of need,
if you know what I mean. I didn’t mean for what I wrote to be taken
[very] seriously. Sorry. Well, I hope whis shall be a lesson for me.
I wish to apologize for my rant. What I wrote was merely “air venting”;
it wasn’t actually about Ruby. I utilized the fact that Ruby-talk isn’t
only for getting technical answers but also for “hugs” in times of need,
if you know what I mean. I didn’t mean for what I wrote to be taken
[very] seriously. Sorry. Well, I hope whis shall be a lesson for me.
When you scream in your own room, your neighbors hear you.
When you scream on the internet, Matz hears you too.
I wish to apologize for my rant. What I wrote was merely “air venting”;
it wasn’t actually about Ruby. I utilized the fact that Ruby-talk isn’t
only for getting technical answers but also for “hugs” in times of need,
if you know what I mean.
I do, here you go XOXOXOXO
I didn’t mean for what I wrote to be taken
[very] seriously.
just a little serious then?
Sorry. Well, I hope whis shall be a lesson for me.