When learning ruby blocks I've read that the context of the block, as the example in http://www.rubycentral.com/book/tut_containers.html
def nTimes(aThing)
  return proc { |n| aThing * n }
p1 = nTimes(23)
p1.call(3) 	» 	69
p1.call(4) 	» 	92
p2 = nTimes("Hello ")
p2.call(3) 	» 	"Hello Hello Hello "
But now I wanna to write GUIs and reading the QtRuby documentation I saw this use of blocks:
 w = MyWidget.new { setCaption("foobar") }
. The document explains the sample saying that " The block will be called in the context of the newly created instance". Is it a misuse of ruby blocks??