I always got the impression that returninside the block was undefined. Can you use nextinstead?
For example, Rubinius also has this problem, but much more explicit:
[1].map(&lambda { |n| return -1 })
LocalJumpError: unexpected return
, next :
rbx-head :003 > [1].map(&lambda { |n| next -1 })
=> [-1]
, return , Procs lambdas - . next break - , , .
return Ruby, rubyspec , return, .
https://github.com/rubyspec/rubyspec/blob/master/language/return_spec.rb#L184