You can do the same thing in Ruby, although I think it's cursed:
fn = -> x { puts "hello #{x}" }
fn.('world')
In Ruby, .() is an alias to #call. fn = -> x { puts "hello #{x}" }
fn.('world')
In Ruby, .() is an alias to #call. irb(main):008:0> class Integer
irb(main):009:1> def call(b); self.+(b) end
irb(main):010:1> end
=> :call
irb(main):011:0> 1.(2)
=> 3
:D