Le 5 f˝Îrier 2009 21:50, James Byrne a ˝─rit :

> How do I get a literal string like /usr\/lib,test\/lib into a variable?
> Where are these extra '\' artifacts coming from?

It's just the representation.  IRB always shows strings double quoted,
and, in double quotes, a lone \ has to be escaped.

A small example is perhaps more convincing :

22:10 fred@balvenie:~% irb
>> x = '\/usr\/lib'
=> "\\/usr\\/lib"
>> x.length
=> 10
>> '\/usr\/lib' == "\\/usr\\/lib"
=> true

HTH,

Fred
-- 
Any time tomorrow  I will try to do what's right
Making sense of all I can
Any time tomorrow  I'll pretend to see the light
I just might  Shadowman                         (K's Choice, Shadow Man)