Of note, there is already a working patch (for a very similar feature) =
for the 1.9 branch at the ruby-patches github repo [0], ported from the =
old Suby experiment project [1].

It doesn't use ".\", just "\" and has an implicit self form, too. So:

\class # =3D> #<Method: Object(Kernel)#class>
1\+ # =3D> #<Method: Fixnum#+>
"hello"\` # =3D> #<Method: String(Kernel)#`>
"hi"\class.class # =3D> Method
"hi"\class\type\class # =3D> #<Method: Method(Kernel)#class>

[0] =
https://github.com/michaeledgar/ruby-patches/tree/master/1.9/method_operat=
or
[1] http://rubyforge.org/projects/suby/

On Sep 25, 2011, at 4:13 PM, Eric Hodel wrote:

>=20
> Issue #5364 has been updated by Eric Hodel.
>=20
> Category set to core
>=20
> =3Dbegin
> I find myself rarely needing to call #method and I don't often see =
code where other people call #method, so I don't see the need to add =
special syntax for it.  Is there a reason why you use #method very often =
and that having a more compact syntax would help?
>=20
> Note that \ can be used at the end of a line to continue it to the =
next line:
>=20
>  return \
>    really_long_expression
> =3Dend
>=20
> ----------------------------------------
> Feature #5364: How about new syntax: "object.\method" returns a Method =
instance?
> http://redmine.ruby-lang.org/issues/5364
>=20
> Author: Joey Zhou
> Status: Open
> Priority: Normal
> Assignee:=20
> Category: core
> Target version:=20
>=20
>=20
> I'm afraid the normal way of creating a Method instance is circuitous =
and a bit hard to write:
>=20
>    a_method =3D object.method(:method_name)
>=20
> I find the way of obtaining a function/method object in Python is so =
easy, for example, "str.split()" returns a list, while "str.split" =
(without parentheses) returns a method object. However, parenthesis in =
Ruby is always optional, so this road is blocked.
>=20
> Well, how about "object.\method" style? You can type "str.\split" to =
get "str.method(:split)".
>=20
> The reasons are:
>=20
> 1. It makes people happy, writing less code, and no harm to =
readability.
>=20
> 2. "\" is not a frequently used token. It can only be used in strings, =
regexps (or any else?). I think using this token leads to no ambiguity.
>=20
> 3. "\" is like Perl's referrence symbol. In Perl, you can use "$f =3D =
\&func;" to make a referrence to the function. In Ruby, "&" seems =
unnecessary.
>=20
> 4. It enhances the consistency of the language syntax. There are two =
correlative methods "Object#send" and "Object#method", but...
>=20
>    str.send(:split)       =3D=3D str.split
>    str.method(:split)   =3D=3D ???????
>=20
> If adding this new syntax, it looks more pretty:
>=20
>    str.method(:split)   =3D=3D str.\split
>=20
>=20
>=20
> --=20
> http://redmine.ruby-lang.org
>=20