From: Intransition Date: 2013-01-04T11:57:16+09:00 Subject: Literal notation for Pathnames ------=_Part_910_19196917.1357265447926 Content-Type: multipart/alternative; boundary="----=_Part_911_16731781.1357265447927" ------=_Part_911_16731781.1357265447927 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 #=> # ./foo/bar #=> # ../foo/bar #=> # and/or /"foo/bar" #=> # ./"foo/bar" #=> # ../"foo/bar" #=> # So, `/`, `./` and `../` would be special keyword and/or unary operators for creating Pathname object. Thoughts? ------=_Part_911_16731781.1357265447927 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit 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?


------=_Part_911_16731781.1357265447927-- ------=_Part_910_19196917.1357265447926--