> -----Original Message----- > From: Logan Capaldo [mailto:logancapaldo / gmail.com] > Sent: Tuesday, May 30, 2006 10:17 AM > To: ruby-talk ML > Subject: Re: Pathname > > > > On May 30, 2006, at 12:55 AM, Daniel Berger wrote: > > > Daniel Berger wrote: > >> transfire / gmail.com wrote: > > > > <snip> > > > >>> More importantly, I think it would be nice if there were a > >>> shorter way > >>> to define a path, perhaps a percent literal like %p{a/b}. > >> Good idea. I'm stealing it for pathname2. :) > > > > Well, I would have stolen it, except that I forgot that there's no > > way to define % literals in Ruby 1.8 afaik. I'm not sure about 1.9. > > > > Related RCR: http://www.rcrchive.net/rcr/show/279 > > > > Regards, > > > > Dan > > > > > > Well, is this close enough? > > module Kernel > def pn(s) > Pathname.new(s) > end > end > > pn %{a/b} > > It almost looks like a % literal. Hm, I suppose I could do that. :) Thanks, Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.