[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ruby-dev summary 25709-25740

Takaaki Tateishi

2/24/2005 10:53:00 AM


Here is a summary of articles posted to ruby-dev ML last week.

[ruby-dev:25713] pthread trouble on sighandler

Nagai proposed a solution on signal handlers of ruby that enables
native thread, and it was tentatively applied to ruby-1.9.
That solution enables the ruby to ignore signals which are caused
by other threads.

[ruby-dev:25726] named capture

Nishiyama proposed that MatchData#[] receives a symbol and a string, and
returns matched data which is indicated by a label on a regular expression.
That proposal is for a ruby with Oniguruma as a regular expression engine,
as Oniguruma has a feature called "named capture" to specify matched strings
using labels.
--
Takaaki Tateishi <ttate@ttsky.net>



6 Answers

djberg96

2/24/2005 2:37:00 PM

0

Takaaki Tateishi wrote:

> [ruby-dev:25726] named capture
>
> Nishiyama proposed that MatchData#[] receives a symbol and a
string, and
> returns matched data which is indicated by a label on a regular
expression.
> That proposal is for a ruby with Oniguruma as a regular expression
engine,
> as Oniguruma has a feature called "named capture" to specify
matched strings
> using labels.

Can someone please provide some sample code for this? I'm not sure I
get it.

Thanks.

Dan

ts

2/24/2005 2:45:00 PM

0

>>>>> "D" == Daniel Berger <djberg96@hotmail.com> writes:

D> Can someone please provide some sample code for this? I'm not sure I
D> get it.

uln% ruby -e '/(?<name>x+)/ =~ "xxxx" ; p $~[0]'
"xxxx"
uln%

uln% ruby -e '/(?<name>x+)/ =~ "xxxx" ; p $~[:name]'
-e:1:in `[]': cannot convert Symbol into Integer (TypeError)
from -e:1
uln%



Guy Decoux


# cHa\(c\)ker #

12/21/2007 1:41:00 PM

0

> ???? ???? ?? ?????????

?? ??? ???????? ??????????. ????? ??????? ??? ???????? "???????"...
?? ? ???????? ???? ??????? ???????????????.

???????? ?? ???????.
?? ??????? ????? ?????? - ??? ??????? ? ????????? ;)

??. ????? ?? ???? -- ? ?????? ???? ?????????. ?????? ??????? -- ?????????
??????? ???? ??? ????????, ???? ?????????? :(


# cHa\(c\)ker #

12/24/2007 5:20:00 PM

0

?? ? ???????...
????????? 0.5 ??\?
??????????: 3 ??? 10 ?????


Andriy Mikhailov aka Zelfit

12/27/2007 3:28:00 PM

0

?? ??? ??????????? ??? ? ?? ??????? ????????
--
? ?????????? ???????????, Andriy Mikhailov aka Zelfit. E-mail:
anubiz.nospam@gala.net
[ICQ:234034191][CPU:10.103.3.39]
[ftp://anubiz.tr...]


# cHa\(c\)ker #

12/27/2007 7:23:00 PM

0

> ?? ??? ??????????? ??? ? ?? ??????? ????????

ftp://chacker.ethanol/pop...

????:)