Skip to content

Commit

Permalink
Fix method redefined verbose warning
Browse files Browse the repository at this point in the history
Assume if @encoding is already set, that the to_s method was
already overridden.

Fixes #55
  • Loading branch information
jeremyevans committed Jan 24, 2024
1 parent cc829a7 commit bbcce03
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/tk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1317,8 +1317,10 @@ def @tk_cmd_tbl.[]=(idx,val)
@add_tk_procs = [] # table of [name, args, body]

@force_default_encoding ||= [false]
@encoding ||= [nil]
def @encoding.to_s; self.join(nil); end
unless @encoding
@encoding = [nil]
def @encoding.to_s; self.join(nil); end
end

@cb_entry_class = Class.new(TkCallbackEntry){
class << self
Expand Down

0 comments on commit bbcce03

Please sign in to comment.