summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tk/scale.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tk/scale.rb')
-rw-r--r--ext/tk/lib/tk/scale.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/tk/lib/tk/scale.rb b/ext/tk/lib/tk/scale.rb
index 135a0cf62d..7214c46f5e 100644
--- a/ext/tk/lib/tk/scale.rb
+++ b/ext/tk/lib/tk/scale.rb
@@ -11,12 +11,12 @@ class TkScale<TkWindow
def create_self(keys)
if keys and keys != None
if keys.key?('command') && ! keys['command'].kind_of?(String)
- cmd = keys.delete('command')
- keys['command'] = proc{|val| cmd.call(val.to_f)}
+ cmd = keys.delete('command')
+ keys['command'] = proc{|val| cmd.call(val.to_f)}
end
#tk_call_without_enc('scale', @path, *hash_kv(keys, true))
tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
+ *hash_kv(keys, true))
else
#tk_call_without_enc('scale', @path)
tk_call_without_enc(self.class::TkCommandNames[0], @path)
@@ -27,9 +27,9 @@ class TkScale<TkWindow
def _wrap_command_arg(cmd)
proc{|val|
if val.kind_of?(String)
- cmd.call(number(val))
+ cmd.call(number(val))
else
- cmd.call(val)
+ cmd.call(val)
end
}
end
@@ -43,7 +43,7 @@ class TkScale<TkWindow
if (slot == 'command' || slot == :command)
configure('command'=>value)
elsif slot.kind_of?(Hash) &&
- (slot.key?('command') || slot.key?(:command))
+ (slot.key?('command') || slot.key?(:command))
slot = _symbolkey2str(slot)
slot['command'] = _wrap_command_arg(slot.delete('command'))
end