From: foo@... Date: 2002-04-21T10:51:38+09:00 Subject: blocks vs. Procs, closures as objects? what follows is not a criticism or even a suggestion... i'm just ever-curious about language design. i'm also new to Ruby, so feel free to correct any mistaken assumptions. in some other languages which support closures, you can say something like: (define foo (lambda (x) (* x x))) (foo 3) => 9 this is a bit like foo = Proc.new { |x| x * x } foo.call(3) => 9 maybe its just that i learned Scheme first, but it suprises me that you can't say in Ruby: foo = { |x| x * x } foo(3) => 9 this would seem to me to be the principle-of-least-surprise-est thing to do. similarly, i would expect the following to work { |x| x * x }.type => Proc, or Block, or Method, or something... a block is apparently not an object in ruby, which i guess means that it's not an expression, either... anyone care to explain the rationale behind this? -brian