aboutsummaryrefslogtreecommitdiffstats
path: root/ext/tk/lib/tk/variable.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tk/variable.rb')
-rw-r--r--ext/tk/lib/tk/variable.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/tk/lib/tk/variable.rb b/ext/tk/lib/tk/variable.rb
index bdd441705b..6fc2ffdf2f 100644
--- a/ext/tk/lib/tk/variable.rb
+++ b/ext/tk/lib/tk/variable.rb
@@ -16,7 +16,7 @@ class TkVariable
#TkVar_ID_TBL = {}
TkVar_CB_TBL = TkCore::INTERP.create_table
TkVar_ID_TBL = TkCore::INTERP.create_table
- (Tk_VARIABLE_ID = ["v".freeze, "00000".taint]).instance_eval{
+ (Tk_VARIABLE_ID = ["v".freeze, TkUtil.untrust("00000")]).instance_eval{
@mutex = Mutex.new
def mutex; @mutex; end
freeze
@@ -1239,6 +1239,14 @@ end
end
end
+ def ===(other)
+ if other.kind_of?(TkVariable)
+ self.id == other.id
+ else
+ super
+ end
+ end
+
def zero?
numeric.zero?
end