There's nothing special about the combination of the ampersand and the symbol. Here's an example that (ab)uses the regex:
class Regexp
def to_proc
->(str) { self =~ str ; $1 }
end
end
%w(station nation information).map &/(.*)ion/
=> ["stat", "nat", "informat"]
Or integers.
class Integer
def to_proc
->(arr) { arr[self] }
end
end
arr = [[*3..7],[*14..27],[*?a..?z]]
arr.map &4
=> [7, 18, "e"]
Who needs arr.map(&:fifth)
when you have arr.map &4
?