require 'tk' TkButton.new(nil, 'text'=>'messageBox', 'command'=>proc{ Tk.messageBox( 'message'=>'Really quit?')}).pack Tk.mainloop