Hm, I suppose I could do that. :slight_smile:



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.


-----Original Message-----
From: Logan Capaldo []
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:
>> 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. :slight_smile:
> 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:
> Regards,
> Dan

Well, is this close enough?

module Kernel
聽聽聽def pn(s)

pn %{a/b}

It almost looks like a % literal.