One thing I would like Ruby to have is a concise literal notation for 
pathnames. So maybe Ruby could have a literal notation as follows:

    /foo/bar    #=> #<Pathname:/foo/bar>
    ./foo/bar   #=> #<Pathname:./foo/bar>
    ../foo/bar  #=> #<Pathname:../foo/bar>

and/or

    /"foo/bar"    #=> #<Pathname:/foo/bar>
    ./"foo/bar"   #=> #<Pathname:./foo/bar>
    ../"foo/bar"  #=> #<Pathname:../foo/bar>

So, `/`, `./` and `../` would be special keyword and/or unary operators for 
creating Pathname object.

Thoughts?


-- You received this message because you are subscribed to the Google Groups 
ruby-talk-google group. To post to this group, send email to 
[email protected]. To unsubscribe from this group, send email 
to [email protected]. For more options, visit this 
group at https://groups.google.com/d/forum/ruby-talk-google?hl=en

Reply via email to