[#927] UnboundMethod#to_proc — Dave Thomas <dave@...>

I'm wondering what I can do with a Proc generated by

17 messages 2003/04/06

Is this an intended change in string interpolation

From: Dave Thomas <dave@...>
Date: 2003-04-08 04:37:29 UTC
List: ruby-core #945
In the latest CVS:

irb(main):002:0> /c(a)t/ =~ "cat"
=> 0
irb(main):003:0> "d#$1ve"
=> "d"

In older Rubies, the #$1 sequence was interpolated without swallowing 
the rest of the string.

Also now I can create globals such as

irb(main):004:0> $1ve = "cat"
=> "cat"
irb(main):005:0> "d#$1ve"
=> "dcat"

Cool feature, or wee bug?  :)


Cheers


Dave


In This Thread

Prev Next