>>>>> "m" == mips  <mips / cyberspace.org> writes:

m> Well it works too when i remove the 'return', i'm missing something in
m> the usage of return.

 You have probably written something like this

pigeon% cat b.rb
#!/usr/bin/ruby
def a
   pos_menu = Proc.new do |m, x, y|
      puts "x, y : #{x}, #{y}"
      return [1, 2]
   end
   p "result : #{pos_menu['m', 12, 24]}"
end
puts "call a() : #{a}"

pigeon% 

pigeon% b.rb
x, y : 12, 24
call a() : 12
pigeon% 


 the `return' in pos_menu is the exit point for #a, not for the Proc
 object. 


Guy Decoux