summaryrefslogtreecommitdiff
path: root/sample/tkhello.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sample/tkhello.rb')
-rw-r--r--sample/tkhello.rb17
1 files changed, 7 insertions, 10 deletions
diff --git a/sample/tkhello.rb b/sample/tkhello.rb
index 1ff1403e71..5188fe1c8c 100644
--- a/sample/tkhello.rb
+++ b/sample/tkhello.rb
@@ -1,13 +1,10 @@
require "tk"
-TkButton.new {
- text 'hello'
- command proc{print "hello\n"}
- pack('fill'=>'x')
-}
-TkButton.new {
- text 'quit'
- command 'exit'
- pack('fill'=>'x')
-}
+TkButton.new(nil,
+ 'text' => 'hello',
+ 'command' => proc{print "hello\n"}).pack('fill'=>'x')
+TkButton.new(nil,
+ 'text' => 'quit',
+ 'command' => 'exit').pack('fill'=>'x')
+
Tk.mainloop